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
Post a Comment