Example #1
0
 public void AddPlayer(Player player)
 {
     ThrowIf.ArgumentIsNull(player);
     using (var connection = connectionFactory.Connect())
     {
         string            sql = GetInsertStatement();
         DynamicParameters p   = SetupInsertParameters(player);
         connection.Open();
         connection.Execute(sql, p);
     }
     memberQuery.UpdateCache();
 }
Example #2
0
 public void DeleteCoach(Coach coach)
 {
     ThrowIf.ArgumentIsNull(coach);
     using (var connection = connectionFactory.Connect()) {
         string sql = "UPDATE Coaches SET Deleted=1, DeletedOn=GetDate() WHERE Guid = @CoachGuid";
         var    p   = new DynamicParameters();
         p.Add("@CoachGuid", coach.Guid.ToString());
         connection.Open();
         connection.Execute(sql, p);
     }
     memberQuery.UpdateCache();
 }