emremp
emremp

Reputation: 634

How to stored procedure complex type to poco?

I have a sql procedure and created a function import with entity framework on my web project. Fine but I want to poco object of my storedprocedure_Result object. Can i generate poco classes with ADO.NET EntityObject Generator? Actually i will output a json data of my sql procedure result with entity framework.

Upvotes: 0

Views: 1067

Answers (1)

Kaido
Kaido

Reputation: 3951

You can detach the datacontext from the entity or create a poco manually (or use something like this: http://visualstudiogallery.msdn.microsoft.com/7812b04c-db36-4817-8a84-e73c452410a2) and map it with something like Automapper / ValueInjector.

If you are going to map it I would suggest you follow the repository pattern and expose the poco classes from the repository.

Upvotes: 1

Related Questions