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