public ActionResult SetRealEstateLanguage([FromBody] LanguageDto languageDto, CancellationToken CancellationToken) { var lang = ModelService.Get(languageDto.Id); var realEstate = ModelService.DbContext.RealEstate.First(); realEstate.LanguageIdDefault = lang.Id; ModelService.DbContext.RealEstate.Update(realEstate); ModelService.DbContext.SaveChanges(); _languageProvider.ChangeLanguage((LanguageDto) new LanguageDto().From(lang)); return(NoContent()); }