/// <summary> /// Convert City Entity into City Object /// </summary> ///<param name="model">CityViewModel</param> ///<param name="CityEntity">DataAccess.City</param> ///<returns>CityViewModel</returns> public static CityViewModel ToViewModel( this DataAccess.City entity, CityViewModel model) { model.Id = entity.Id; model.CountryId = entity.ProvinceId; model.Name = entity.Name; model.Country = entity.Province.Name; model.IsActive = entity.IsActive; return(model); }
public JsonResult AddCity(City city) { string data = null; try { CityService.AddCity(city); } catch (Exception e) { data = e.Message; } return new JsonResult { Data = data, JsonRequestBehavior = JsonRequestBehavior.AllowGet }; }
public void AddCity(City city) { CityRepository.Add(city); }
private void attach_City(City entity) { this.SendPropertyChanging(); entity.SmallArea = this; }
private void detach_City(City entity) { this.SendPropertyChanging(); entity.SmallArea = null; }
private void detach_City(City entity) { this.SendPropertyChanging(); entity.Province = null; }
private void attach_City(City entity) { this.SendPropertyChanging(); entity.Province = this; }
partial void DeleteCity(City instance);
partial void UpdateCity(City instance);
partial void InsertCity(City instance);