public void AddTournament(Domain.Tournament tournament) { try { var command = Entlib.GetStoredProcCommand("dbo.AddTournament"); Entlib.AddInParameter(command, "GameId", DbType.Int32, tournament.GameId); Entlib.AddInParameter(command, "UserId", DbType.String, tournament.UserId); Entlib.ExecuteNonQuery(command); } catch (Exception ex) { Logger.ErrorException(ex.Message, ex); throw; } }
public void UpdateGame(Domain.Game game) { try { var command = Entlib.GetStoredProcCommand("dbo.UpdateGame"); Entlib.AddInParameter(command, "Id", DbType.Int32, game.Id); Entlib.AddInParameter(command, "WinnerId", DbType.String, game.WinnerId); Entlib.AddInParameter(command, "Status", DbType.String, game.Status); Entlib.AddInParameter(command, "EndDate", DbType.DateTime, game.EndDate); Entlib.ExecuteNonQuery(command); } catch (Exception ex) { Logger.ErrorException(ex.Message, ex); throw; } }
public void UpdateAccess(ServiceAccess access) { try { var command = Entlib.GetStoredProcCommand("sec.SaveAccess"); Entlib.AddInParameter(command, "RoleId", DbType.String, access.RoleId); Entlib.AddInParameter(command, "userid", DbType.String, access.UserId); Entlib.AddInParameter(command, "allow", DbType.Boolean, access.Allow); //Entlib.AddInParameter(command, "ApplicationId", DbType.Int32, access.ApplicationId); Entlib.AddInParameter(command, "ServiceId", DbType.Int32, access.ServiceId); Entlib.AddInParameter(command, "LastUpdate", DbType.DateTime, access.LastUpdate); Entlib.ExecuteNonQuery(command); } catch (Exception ex) { Logger.ErrorException(ex.Message, ex); throw ex; } }