entity framework - Stateless Asp.Net MVC disables some features of EF -
i reading book on asp.net mvc, author has mentioned due stateless nature of asp.net mvc of features in entity framework disabled.
with in mind, best abstract data access layer. repository pattern 1 of used patterns managing data abstraction.
i curious know, features of ef disabled, if repository pattern not used data abstraction.
in particular, entity tracking not useful, because have new object instance on each request. workaround update is:
var entity = new entity(); entity.id = id; content.entry(entity).state = entitystate.modified; context.savechanges();
Comments
Post a Comment