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