Ejemplo n.º 1
0
 public async Task <bool> AddToEs(RProvince province, RDistrict district, RWard ward, RStreet street)
 {
     //RLocation location = CreateLocation(province, district, ward, street);
     //IndexEs<RLocation> indexEs = new IndexEs<RLocation>(EnumDefine.EsIndexName.AddressesBase, EnumDefine.EsIndexType.AddressBase, location.Key, location);
     //string response = await _esStorage.Add(indexEs);
     //var obj = Serialize.JsonDeserializeObject<EsAddResultDetail>(response);
     //return obj._shards.successful > 0 && obj._shards.failed <= 0;
     return(false);
 }
Ejemplo n.º 2
0
        public static WardViewModel ToModelWard(this RWard ward)
        {
            if (ward == null)
            {
                return(null);
            }

            return(new WardViewModel()
            {
                WardName = ward.WardName,
                Id = ward.Id
            });
        }
Ejemplo n.º 3
0
        public static LocationDetailResponse ToModelWardDetail(this RWard ward)
        {
            if (ward == null)
            {
                return(null);
            }

            return(new LocationDetailResponse()
            {
                Id = ward.Id,
                WardName = ward.WardName,
                WardNameEN = ward.WardNameEN,
                Prefix = ward.Prefix,
                ShortName = ward.ShortName,
                ProvinceId = ward.ProvinceId,
                ProvinceName = ward.ProvinceName,
                DistrictId = ward.DistrictId,
                DistrictName = ward.DistrictName
            });
        }