public CategoryService( ICreatorsDbContext dbContext) { Guard.WhenArgument(dbContext, "dbContext").IsNull().Throw(); this.dbContext = dbContext; }
public PostService( ICreatorsDbContext dbContext, ICreatorsDbSaveChangesContext dbSaveChangesContext, IPostFactory postFactory, ICategoryService categoryService, IUserService userService) { Guard.WhenArgument(dbContext, "dbContext").IsNull().Throw(); Guard.WhenArgument(dbSaveChangesContext, "dbSaveChangesContext").IsNull().Throw(); Guard.WhenArgument(postFactory, "postFactory").IsNull().Throw(); Guard.WhenArgument(categoryService, "categoryService").IsNull().Throw(); Guard.WhenArgument(userService, "userService").IsNull().Throw(); this.dbContext = dbContext; this.dbSaveChangesContext = dbSaveChangesContext; this.categoryService = categoryService; this.userService = userService; this.postFactory = postFactory; }