public void Update(TBL_BILLDETAILS billDetail) { var k = Context.TBL_BILLDETAILS.Where(p => p.BillDetailId == billDetail.BillDetailId).FirstOrDefault(); k.BillDetailId = billDetail.BillDetailId; k.BillId = billDetail.BillId; k.ProductId = billDetail.ProductId; k.Quantity = billDetail.Quantity; k.QuantityPrice = billDetail.QuantityPrice; k.DiscountPrice = billDetail.DiscountPrice; k.Discount = billDetail.Discount; Context.SaveChanges(); }
public void Add(TBL_BILLDETAILS product) { Context.TBL_BILLDETAILS.Add(product); Context.SaveChanges(); }