/// <summary> /// Se confirma que todos los objetos del modelo implementan la interface IObjectWithState /// </summary> /// <param name="context"></param> private static void CheckForEntitiesWithoutStateInterface(NWContext context) { var entitiesWithoutState = from e in context.ChangeTracker.Entries() where !(e.Entity is IObjectWithState) select e; if (entitiesWithoutState.Any()) { throw new NotSupportedException("Todas la entidades deben implementar IObjectWithState."); } }
public BaseRepository(NWContext db) { _db = db; }
public CategoryRepository(NWContext context) : base(context) { }
public CategoryD(NWContext db) { _db = db; }