public void CRUD() { //using (TransactionScope scope = new TransactionScope()) //{ GSTSvc svc = new GSTSvc(); //Create GST entity = new GST() { Code="07", Rate=7 }; object result = svc.Save(entity); int id = ((GST)result).Id; //Get GST newEntity = svc.GetById(id); Assert.AreEqual(newEntity.Code, "07"); //Update newEntity.Rate = 5; svc.Update(newEntity); Assert.AreEqual(newEntity.Rate, 5); //Delete svc.Delete(id); Assert.AreEqual(svc.GetById(id), null); //} }
public DataImportor(ICustomerRepo iCustomerRepo, IGSTRepo iGSTRepo, IInvoiceRepo iInvoiceRepo, IOrderDetailRepo iOrderDetailRepo, ISalesmanRepo iSalesmanRepo,IPaymentRepo iPaymentRepo,IPaymentDetailRepo iPaymentDetailRepo) { custSvr = new CustomerSvc(iCustomerRepo); gstSvr = new GSTSvc(iGSTRepo); invSvr = new InvoiceSvc(iInvoiceRepo); orderDetailSvr = new OrderDetailSvc(iOrderDetailRepo); salesmanSvc = new SalesmanSvc(iSalesmanRepo); paymentSvc = new PaymentSvc(iPaymentRepo); paymentDetailSvc = new PaymentDetailSvc(iPaymentDetailRepo); }
public GSTController(IGSTRepo iGSTRepo) { svc = new GSTSvc(iGSTRepo); }