Ejemplo n.º 1
0
        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);
            }
        }
Ejemplo n.º 2
0
 public string InsertRecieveddProduct(RecieveProduct recieveProduct)
 {
     context.RecieveProducts.Add(recieveProduct);
     context.SaveChangesAsync();
     return(recieveProduct.Id.ToString());
 }