public ProcessResult Update(Country newInfoCountry) { ProcessResult result = VerifeyModel(newInfoCountry); if (result.Result != Extensions.BLLResult.Verified) { return(result); } DAL.Extensions.DataBaseResult insert = _countryDal.Update(newInfoCountry); switch (insert) { //case DAL.Extensions.DataBaseResult.AlreadyFound: // result.Result = Extensions.BLLResult.AlreadyFound; // result.Errors.Add(Extensions.AlreadyFoundString(newInfoCountry.Name)); // break; case DAL.Extensions.DataBaseResult.Error: result.Result = Extensions.BLLResult.InnerException; result.Errors.Add(Extensions.InnerException); break; case DAL.Extensions.DataBaseResult.Success: result.Result = Extensions.BLLResult.Success; result.Errors.Add(Extensions.SuccessProcess); break; case DAL.Extensions.DataBaseResult.ServerDisable: result.Result = Extensions.BLLResult.ServerDisable; result.Errors.Add(Extensions.ServerDisable); break; case DAL.Extensions.DataBaseResult.AlreadyFound: break; case DAL.Extensions.DataBaseResult.Referanced: break; case DAL.Extensions.DataBaseResult.NotFound: break; default: throw new ArgumentOutOfRangeException(); } return(result); }
public bool Update(CountryVM countryVm) { var result = new Country { CountryId = countryVm.Id, Code = countryVm.Code, CountryLanguages = new List <CountryLanguage>() }; var item = new CountryLanguage(); item.CountryId = countryVm.Id; item.Name = countryVm.Name; item.Language = countryVm.Language ?? _userInfo.CurrentLanguage; item.CountryLanguageId = countryVm.LanguageId ?? Guid.NewGuid(); result.CountryLanguages.Add(item); return(_countryDal.Update(result)); }
public static bool UpdateCountry(Country data) { return(CountryDB.Update(data)); }
public bool Update(Country model) { return(_countryDAL.Update(model) > 0); }
public void Update(Country entity) { _countryDAL.Update(entity); }
public void Update(Country data) { _context.Update(data); }