Exemple #1
0
 public bool Delete()
 {
     try
     {
         DALC.Torneo torneo = CommonBC.SystemLeagueEntities.Torneo.First(t => t.Id == Id);
         CommonBC.SystemLeagueEntities.Torneo.Remove(torneo);
         CommonBC.SystemLeagueEntities.SaveChanges();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
Exemple #2
0
 public bool Update()
 {
     try
     {
         DALC.Torneo torneo = CommonBC.SystemLeagueEntities.Torneo.First(t => t.Id == Id);
         torneo.Nombre = Nombre;
         CommonBC.SystemLeagueEntities.SaveChanges();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
Exemple #3
0
 public bool Read()
 {
     try
     {
         DALC.Torneo torneo = CommonBC.SystemLeagueEntities.Torneo.First(t => t.Id == Id);
         Id     = torneo.Id;
         Nombre = torneo.Nombre;
         CommonBC.SystemLeagueEntities.Torneo.Add(torneo);
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
Exemple #4
0
        //crud

        public bool Create()
        {
            try
            {
                DALC.Torneo torneo = new DALC.Torneo();
                torneo.Id     = Id;
                torneo.Nombre = Nombre;
                CommonBC.SystemLeagueEntities.Torneo.Add(torneo);
                CommonBC.SystemLeagueEntities.SaveChanges();
                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }