Ejemplo n.º 1
0
 public GameTableModel GetById(int tableId)
 {
     using (GameTableManagementServiceClient proxy = new GameTableManagementServiceClient()) {
         var serviceGameTable = proxy.GetGameTableById(tableId);
         Models.GameTableModel clientGameTable = GameTableModelConverter.ConvertFromServiceGameTableToClientGameTable(serviceGameTable);
         return(clientGameTable);
     }
 }
Ejemplo n.º 2
0
 public List <GameTableModel> GetAll()
 {
     using (GameTableManagementServiceClient proxy = new GameTableManagementServiceClient()) {
         var serviceGameTables = proxy.GetAll();
         List <Models.GameTableModel> clientGameTables = GameTableModelConverter.ConvertFromServiceGameTablesToClientGameTables(serviceGameTables);
         return(clientGameTables);
     }
 }
Ejemplo n.º 3
0
 public GameTableModel CreateGameTable(CGUserModel userModel, string tableName)
 {
     using (GameTableManagementServiceClient proxy = new GameTableManagementServiceClient()) {
         GameTableModel tableModel = null;
         CGUser         user       = GameTableModelConverter.ConvertFromClientUserToServiceUser(userModel);
         tableModel = GameTableModelConverter.ConvertFromServiceGameTableToClientGameTable(proxy.CreateGameTable(user, tableName));
         return(tableModel);
     }
 }