public CommentController(CommentRepository commentRepository, CommentTypeRepository commentTypeRepository, DbContext context, MovieRepository movieRepository, CinemaRepository cinemaRepository) { this.commentRepository = commentRepository; this.commentTypeRepository = commentTypeRepository; this.movieRepository = movieRepository; this.cinemaRepository = cinemaRepository; this.context = context; userMgr = new ApplicationUserManager(new UserStore <ApplicationUser>(context)); }
public static CommentTypeCollection GetAll() { var repository = new CommentTypeRepository(); var collection = new CommentTypeCollection(); var colletionDTO = repository.FetchAll(new CommentTypeCriteria()); foreach (DTO.CommentTypeDTO dto in colletionDTO) { var taskStatus = CommentType.CopyFromDTO(dto); taskStatus.MarkOld(); collection.Add(taskStatus); } return(collection); }