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());
        }
Beispiel #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);
        }
Beispiel #3
0
 public int Addcontractwithproccall(Update_Contract_PUT_Method_API b)
 {
     throw new NotImplementedException();
 }
Beispiel #4
0
 public int AddContract(Update_Contract_PUT_Method_API b)
 {
     throw new NotImplementedException();
 }
Beispiel #5
0
 public int UpdateContract(string custname, Update_Contract_PUT_Method_API b)
 {
     throw new NotImplementedException();
 }