public OrderController(ITheRepository theRepository, IDSNURepository dsnuRepository, INURepository nuRepository, IHoaDonRepository hoadonRepository, ICTHDRepository cthdRepository) { this.theRepository = theRepository; this.dsnuRepository = dsnuRepository; this.nuRepository = nuRepository; this.hoadonRepository = hoadonRepository; this.cthdRepository = cthdRepository; }
public HoaDonController(INURepository nuRepository, IHoaDonRepository hoadonRepository, ICTHDRepository cthdRepository) { this.nuRepository = nuRepository; this.hoadonRepository = hoadonRepository; this.cthdRepository = cthdRepository; }
private readonly ICTHDRepository _cthdRepository; //Tạo biến chứa dữ liệu public CTHDServices(ICTHDRepository cthdRepository) //constructor để gán dữ liệu vào biến, chi tiết xem thêm ở SanPhamServices.cs { _cthdRepository = cthdRepository; }