Example #1
0
 public void Add(Sport sport)
 {
     _sports.Add(sport);
 }
Example #2
0
        public void Delete(int sportId)
        {
            var sport = new Sport() { Id = sportId };

            _sports.Attach(sport);

            _sports.Remove(sport);
        }
Example #3
0
        public void EditSport(Sport sport)
        {
            _sports.Attach(sport);

            _dbContext.Entry(sport).Property(s => s.Name).IsModified = true;

        }