예제 #1
0
        public int AddUmpire(int matchId, string umpirename, bool primary)
        {
            UmpireEntity newUmpire = new UmpireEntity
            {
                Name    = umpirename,
                MatchId = matchId,
                Primary = primary
            };

            return(UmpiresTable.AddUmpire(newUmpire));
        }
예제 #2
0
        public bool DeleteUmpire(UmpireEntity umpire)
        {
            var val = true;

            try
            {
                Connection.DeleteAsync(umpire);
            }
            catch (Exception)
            {
                val = false;
            }
            return(val);
        }
예제 #3
0
 public bool DeleteUmpire(UmpireEntity umpire)
 {
     return(UmpiresTable.DeleteUmpire(umpire));
 }
예제 #4
0
 public bool UpdateUmpire(UmpireEntity umpire)
 {
     return(UmpiresTable.UpdateUmpire(umpire));
 }
예제 #5
0
 public int AddUmpire(UmpireEntity umpire)
 {
     Connection.InsertAsync(umpire);
     return(Connection.Table <UmpireEntity>().OrderByDescending(id => id.Id).FirstOrDefaultAsync().Result.Id);
 }