public CakeOrderController(ICakeOrderService cakeOrderService)
 {
     _cakeOrderService = cakeOrderService ?? throw new ArgumentNullException(nameof(cakeOrderService));  // DI esnasında null ise bunu baştan bilelim.
 }
Example #2
0
 public NewOrderController(ICakeOrderService cakeOrderService, IHttpContextAccessor httpContextAccessor)
 {
     _cakeOrderService = cakeOrderService;
     _caller           = httpContextAccessor.HttpContext.User;
 }
 public AdminController(ICakeOrderService cakeOrderService)
 {
     _cakeOrderService = cakeOrderService ?? throw new ArgumentNullException(nameof(cakeOrderService));
 }