Beispiel #1
0
        public ActionResult <StatusReadDTO> CreateStatus([FromBody] StatusUpdateDTO stDTO)
        {
            PatientStatus p_st = _mapper.Map <PatientStatus>(stDTO);

            _repository.CreateStatus(p_st);
            _repository.SaveChanges();

            return(Ok(_mapper.Map <StatusReadDTO>(p_st)));
        }
Beispiel #2
0
 public IHttpActionResult AddNewStatus(Status value)
 {
     if (ModelState.IsValid)
     {
         repo.CreateStatus(value);
         return(Ok("Data Entered Successfully"));
     }
     else
     {
         return(NotFound());
     }
 }