public IActionResult Post([FromBody] Hasta model) { ServiceResponse <Hasta> response = new ServiceResponse <Hasta>(); if (service.GetByTc(model.TC)) { response.Errors.Add("böyle bir tcli Hasta var"); response.HasError = true; return(BadRequest(response)); } else { service.Create(model); response.entity = model; response.IsSuccessful = true; return(Ok(response)); } }