public void Save(JObject obj) { string type = obj.Properties().ElementAt(0).Name; JObject data = (JObject)obj[type]; Call c = data.ToObject <Call>(); Call call = callRepository.GetCallById(c.Id); if (call == null) { callRepository.InsertCall(c); } }
public ActionResult <IEnumerable <Call> > GetCallById(int id) { var call = _repository.GetCallById(id); return(Ok(call)); }
public IActionResult Get(Guid id) { var call = _callRepository.GetCallById(id); return(new OkObjectResult(call)); }