c# - Getting changes for a specific entity -


is there more efficient way of doing following?

public static dbentityentry<t> getentitychanges<t>(dbcontext c, t entity) t: class {     return c.changetracker.entries<t>().firstordefault(t => t.entity == entity);         } 

i have entity, , changes entity. there way these without enumerating through all changed entities?

i think looking for:

public static dbentityentry<t> getentitychanges2<t>(dbcontext c, t entity) t: class {     return c.entry(entity); } 

note: in practice, there hardly point wrapping in method, i'm doing stay consistent question


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -