public OrderViewModelMapper(
     DaisContext context,
     IViewModelMapper <Dish, DishViewModel> dishMapper)
 {
     this.context    = context ?? throw new ArgumentNullException(nameof(context));
     this.dishMapper = dishMapper ?? throw new ArgumentNullException(nameof(dishMapper));
 }
 public HomeController(
     DaisContext context,
     IDishService dishService,
     IViewModelMapper <Dish, DishViewModel> dishMapper)
 {
     this.context     = context ?? throw new ArgumentNullException(nameof(context));
     this.dishService = dishService ?? throw new ArgumentNullException(nameof(dishService));
     this.dishMapper  = dishMapper ?? throw new ArgumentNullException(nameof(dishMapper));
 }
Ejemplo n.º 3
0
 public UserController(
     DaisContext context,
     IViewModelMapper <Dish, DishViewModel> dishMapper,
     IUserService userService,
     IHttpContextAccessor httpContextAccessor,
     IViewModelMapper <IReadOnlyCollection <Order>, WeeklyOrdersViewModel> weeklyOrdersMapper)
 {
     this.context             = context ?? throw new ArgumentNullException(nameof(context));
     this.dishMapper          = dishMapper ?? throw new ArgumentNullException(nameof(dishMapper));
     this.userService         = userService ?? throw new ArgumentNullException(nameof(userService));
     this.httpContextAccessor = httpContextAccessor ?? throw new ArgumentNullException(nameof(httpContextAccessor));
     this.weeklyOrdersMapper  = weeklyOrdersMapper ?? throw new ArgumentNullException(nameof(weeklyOrdersMapper));
 }
Ejemplo n.º 4
0
 public DishService(DaisContext context)
 {
     this.context = context ?? throw new ArgumentNullException(nameof(context));
 }