public async Task <bool> Add(StatusCreateDto model) { try { var cat = _mapper.Map <Status>(model); _repoStatus.Add(cat); await _repoStatus.SaveAll(); var langs = model.Langs.Select(x => new StatusLang { StatusID = cat.StatusID, Name = x.Name, LanguageID = x.LanguageID }).ToList(); await _repoStatus.AddStatusLang(langs); return(true); } catch (Exception ex) { return(false); } }