public void AddTeam(DTeam team) { db.AddTeam(team); }
public bool TeamExists(DTeam team) { try { var existingTeam = db.GetTeam(team.Name, team.League.Id); } catch (Exception e) { return false; } return true; }
private DTeam InstantiateTeam(SqlCmdExt cmd) { var team = new DTeam { Id = cmd.GetInt("Id"), Name = cmd.GetString("Name"), League = GetLeague(cmd.GetInt("LeagueId")) }; return team; }
/* ******************************************************* * */ public void AddTeam(DTeam team) { using (var cmd = new SqlCmdExt(_connectionString)) { cmd.CreateCmd(@" INSERT INTO Team (Name, LeagueId) VALUES (@Name, @LeagueId) "); cmd.SetInArg("@Name", team.Name); cmd.SetInArg("@LeagueId", team.League.Id); cmd.ExecuteInsertUpdateDelete(); } }
public bool TeamExists(DTeam team) { return false; }
public void AddTeam(DTeam team) { }