public IActionResult Put([FromBody] Update_Contract_PUT_Method_API b, string CustomerName)
        {
            int res = _procrepo.Updatecontractwithproccall(b, CustomerName);

            if (res != 0)
            {
                return(Ok(res));
            }
            return(NotFound());
        }
Example #2
0
        public int Updatecontractwithproccall(Update_Contract_PUT_Method_API b, string Custname)
        {
            // var contracts = ctx.Contracts.Find(Custname);

            _ = ctx.Contracts.Find(Custname);
            ctx.Database.ExecuteSqlCommand("EXEC Update_Contract_PUT_Method_API @Name,@Address,@dateofbirth, @gender, @saledate, @country",
                                           new SqlParameter("@Name", b.Name),
                                           new SqlParameter("@Address", b.Address),
                                           new SqlParameter("@dateofbirth", b.Dateofbirth),
                                           new SqlParameter("@gender", b.Gender),
                                           new SqlParameter("@saledate", b.Saledate),
                                           new SqlParameter("@country", b.Country));


            int res = ctx.SaveChanges();

            return(res);
        }
Example #3
0
 public int Addcontractwithproccall(Update_Contract_PUT_Method_API b)
 {
     throw new NotImplementedException();
 }
Example #4
0
 public int AddContract(Update_Contract_PUT_Method_API b)
 {
     throw new NotImplementedException();
 }
Example #5
0
 public int UpdateContract(string custname, Update_Contract_PUT_Method_API b)
 {
     throw new NotImplementedException();
 }