public bool UpdateRecievedProduct(RecieveProduct recievedProduct) { context.Entry(recievedProduct).Property(x => x.ProductId).IsModified = true; context.Entry(recievedProduct).Property(x => x.RecievedeDate).IsModified = true; context.Entry(recievedProduct).Property(x => x.Amount).IsModified = true; var result = context.SaveChanges(); if (result > 0) { return(true); } else { return(false); } }
public string InsertRecieveddProduct(RecieveProduct recieveProduct) { context.RecieveProducts.Add(recieveProduct); context.SaveChangesAsync(); return(recieveProduct.Id.ToString()); }