Exemplo n.º 1
0
 public Models.Team Delete(Guid id)
 {
     Models.Team team = this.Get(id);
     this.dbContext.Remove(team);
     this.dbContext.SaveChanges();
     return(team);
 }
Exemplo n.º 2
0
        public Models.Team Update(Models.Team team)
        {
            Models.Team deletedTeam = this.Delete(team.ID);

            if (deletedTeam != null)
            {
                deletedTeam = this.Add(team);
            }

            return(deletedTeam);
        }
Exemplo n.º 3
0
        public Models.Team Delete(Guid id)
        {
            var q = teams.Where(t => t.ID == id);

            Models.Team team = null;

            if (q.Any())
            {
                team = q.First();
                teams.Remove(team);
            }

            return(team);
        }
Exemplo n.º 4
0
 public Models.Team Add(Models.Team team)
 {
     teams.Add(team);
     return(team);
 }
Exemplo n.º 5
0
 public Models.Team Add(Models.Team team)
 {
     this.dbContext.Teams.Add(team);
     this.dbContext.SaveChanges();
     return(team);
 }
Exemplo n.º 6
0
 public Models.Team Update(Models.Team team)
 {
     this.dbContext.Entry(team).State = EntityState.Modified;
     this.dbContext.SaveChanges();
     return(team);
 }