示例#1
0
        public void Delete(Board board)
        {
            List<HomeWork> homeWorks = repository.HomeWorks.Get().ToList();
            var homeWorksByBoard = homeWorks.Where(hw => hw.board == board);
            foreach (var hw in homeWorksByBoard)
            {
                repository.HomeWorks.Delete(hw);
            }

            data.Remove(board);

            dbProvider.RemoveFromDB<Board>(board);
        }
示例#2
0
 public void Delete(HomeWork entity)
 {
     data.Remove(entity);
     dbProvider.RemoveFromDB <HomeWork>(entity);
 }