extend the plattform service with a GetCities function
This commit is contained in:
parent
efc600b433
commit
a849911345
|
@ -6,6 +6,7 @@ using System.ServiceModel;
|
|||
using System.Text;
|
||||
using Plattform.DB;
|
||||
using Plattform.Models;
|
||||
using Plattform.AirlineService;
|
||||
|
||||
namespace Plattform
|
||||
{
|
||||
|
@ -27,5 +28,7 @@ namespace Plattform
|
|||
List<Gender> GetGenders();
|
||||
[OperationContract]
|
||||
List<Salutation> GetSaluations();
|
||||
[OperationContract]
|
||||
List<City> GetCities();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -103,5 +103,18 @@ namespace Plattform
|
|||
return new List<Salutation>();
|
||||
}
|
||||
}
|
||||
public List<City> GetCities()
|
||||
{
|
||||
CityDB cityDB = new CityDB();
|
||||
try
|
||||
{
|
||||
return cityDB.GetAllCities();
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
System.Diagnostics.Trace.WriteLine(e);
|
||||
return new List<City>();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue