Ejemplo n.º 1
0
 public List <Language> GetLanguages()
 {
     using (var context = new ProtalEntities())
     {
         return(context.GetLanguages().Select(x => new Language
         {
             LangID = x.LANG_ID,
             Name = x.NAME,
             Code = x.CODE
         }).ToList());
     }
 }
Ejemplo n.º 2
0
 public List <CusPoi> GetAvailablePoiByDescription(string keyword)
 {
     using (var context = new ProtalEntities())
     {
         return(context.GetAvailablePoiByDescription(keyword).Select(x => new CusPoi
         {
             PoiID = x.POI_ID,
             Address = x.ADDRESS,
             GeocodeStatus = x.GEOCODE_STATUS,
             HouseNr = x.HOUSE_NR,
             HtrsX = x.HTRS_X,
             HTRS_Y = x.HTRS_Y,
             PoiDesc = x.POI_DESC,
             PoiName = x.POI_NAME,
             SettleName = x.SETTL_NAME
         }).ToList());
     }
 }
Ejemplo n.º 3
0
 public CusPoi GetPoiByID(int id)
 {
     using (var context = new ProtalEntities())
     {
         return(context.GetPoiByID(id).Select(x => new CusPoi
         {
             PoiID = x.POI_ID,
             Address = x.ADDRESS,
             GeocodeStatus = x.GEOCODE_STATUS,
             HouseNr = x.HOUSE_NR,
             HtrsX = x.HTRS_X,
             HTRS_Y = x.HTRS_Y,
             PoiDesc = x.POI_DESC,
             PoiName = x.POI_NAME,
             SettleName = x.SETTL_NAME
         }).FirstOrDefault());
     }
 }