Hi everybody,
Entity Framework allows to map the result of a stored procedure to an Entity easily. What I need is to map an Entity to input parameters, so that instead of
context.SaveUser( user.FirstName, user.LastName, ... );
I can simply call it like this:
context.SaveUser( user );
What I really want is to isolate possible schema changes as much as I can. I'm only using EF to generate entities and function imports; the entire interaction with DB is performed through function calls. So whenever User table changes, I want to regenerate User entity in visual designer and change business logic code as appropriate; I do NOT want to change the data access layer. Currently, I'm not seeing any way around those property set dependent calls from data access layer to EF (like the one I posted above), which is a shame, since those could easily be regenerated along with entity classes.
Is there any other strategy which would allow me to achieve the same? The reason I'm using those stored procedures is actually because I want to have full control over SQL (maybe I'm just being paranoid, but it's kind of scary to end up with piles of LINQ code with little or no way to control actual SQL).
Is such thing possible?
Thank you