public bool Update(CountyVM countyVm)
        {
            var result = new County
            {
                CountyId        = countyVm.Id,
                CountyLanguages = new List <CountyLanguage>()
            };

            var item = new CountyLanguage();

            item.CountyId         = countyVm.Id;
            item.Name             = countyVm.Name;
            item.Language         = countyVm.Language ?? _userInfo.CurrentLanguage;
            item.CountyLanguageId = countyVm.LanguageId ?? Guid.NewGuid();
            result.CountyLanguages.Add(item);

            result.CountryId = countyVm.CountryId;

            return(_countyDal.Update(result));
        }
Beispiel #2
0
 public bool Update(County entity)
 {
     return(_countyDal.Update(entity) > 0);
 }