public IActionResult Put(long id, [FromBody] LanguageViewModel language) { if (_languageAppService.GetById(language.Id).Id != 0) { language = _languageAppService.Update(language); language.AddRangeLink(_languageEnricher.CreateLinks(Method.Put, language)); return(Ok(language)); } else { return(BadRequest()); } }
public async Task <IActionResult> GetById(int id) { var model = await Task.FromResult(_service.GetById(id)); return(Ok(model)); }