public void Relase(FeedBackDTO feedBack) { using (IFeedBackService feedBackService = new FeedBackService()) { feedBackService.Create(FeedBackDTOToFeedBack(feedBack)); } }
public FeedBackDTO GetFeedBack(Guid feedBackId) { using (IFeedBackService feedBackSvc = new FeedBackService()) { return(FeedBackToFeedBackDTO(feedBackSvc.GetOneById(feedBackId))); } }
public List <FeedBackDTO> GetAllFeedBack() { List <FeedBackDTO> list; using (IFeedBackService feedBackSvc = new FeedBackService()) { list = feedBackSvc.GetAll().Select(m => new FeedBackDTO() { Content = m.Content, CreateTime = m.CreteTime, FeedBackId = m.Id, Title = m.Title, UserId = m.UserId }).ToList(); } foreach (var item in list) { using (IUserService userSvc = new UserService()) { item.CompanyName = userSvc.GetOneById(item.UserId).CompanyName; } } return(list); }