public EfRepository(MsSqlDbContext context) { Guard.WhenArgument(context, "MsSqlDbContext").IsNull().Throw(); this.Context = context; this.DbSet = this.Context.Set <T>(); if (this.DbSet == null) { throw new ArgumentException("DbContext does not contain DbSet<{0}>", typeof(T).Name); } }
public SaveContext(MsSqlDbContext context) { Guard.WhenArgument(context, "MsSqlDbContext").IsNull().Throw(); this.context = context; }