public string Update(CongitiveDto model) { string query = $"EXECUTE SP_UpdateCongitive '{model.Id}' , '{model.Name}'"; var user = _db.Database.SqlQuery <string>(query).FirstOrDefault(); return(user); }
public IHttpActionResult UpdateCongitive([FromBody] CongitiveDto model) { if (!ModelState.IsValid) { return(BadRequest("Fill Empty Records")); } var result = new SubjectService().Update(model); return(Ok(result)); }