public FollowerService(IUsersDb db, IDataModifiedResultFactory resultFactory) { Guard.WhenArgument(db, nameof(db)).IsNull().Throw(); Guard.WhenArgument(resultFactory, nameof(resultFactory)).IsNull().Throw(); this.db = db; this.resultFactory = resultFactory; }
public EfRepository(IRememBeerMeDbContext context, IDataModifiedResultFactory resultFactory) { if (context == null) { throw new ArgumentNullException(nameof(context)); } if (resultFactory == null) { throw new ArgumentNullException(nameof(resultFactory)); } this.Context = context; this.DbSet = this.Context.Set <T>(); this.resultFactory = resultFactory; }