예제 #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);
     }
 }
예제 #2
0
 public List <GameTableModel> GetAll()
 {
     using (GameTableManagementServiceClient proxy = new GameTableManagementServiceClient()) {
         var serviceGameTables = proxy.GetAll();
         List <Models.GameTableModel> clientGameTables = GameTableModelConverter.ConvertFromServiceGameTablesToClientGameTables(serviceGameTables);
         return(clientGameTables);
     }
 }
예제 #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);
     }
 }