c# - What does Set<TEntity> do in IDbSet interface? -
i read article uow
in entity framework
, has code this:
public interface iunitofwork { idbset<tentity> set<tentity>() tentity : class; int savechanges(); }
i dont understand set<tentity>()
do ?
all entities stored in context different flags (for example deleted, changed) in front of database. if savechanges called synchronization database triggered. set contains deleted , modified marked entities/database records inside transaction. if transaction commit successful changes in entities contained in set visible; if not rollback started. acts cache tracking changes inside target transaction. in article description of uow design pattern can found (http://www.codeproject.com/articles/581487/unit-of-work-design-pattern).
Comments
Post a Comment