Пример #1
0
            public async Task <IEnumerable <SearchEventVM> > Handle(GetEventListQuery request, CancellationToken cancellationToken)
            {
                var _viewEventList = await dbContext.Events.Select(a => new SearchEventVM
                {
                    EventName        = a.EventName,
                    Type             = a.Type,
                    BookingDate      = a.BookingDate,
                    Description      = a.Description,
                    EventClientID    = a.ClientID,
                    EventDate        = a.EventDate,
                    PackageDetailsID = a.EventPackageID,
                    Location         = a.Location,
                    Remarks          = a.Remarks,
                    UserID           = a.CoordinatorID,
                    EventStatus      = a.EventStatus,
                    EntryTime        = a.EntryTime,
                    NumberOfGuests   = a.NumberOfGuests,
                    ProgramStart     = a.ProgramStart,
                    ServingTime      = a.ServingTime,
                    LocationType     = a.LocationType,
                    ServingType      = a.ServingType,
                    Theme            = a.Theme,
                    VenueType        = a.VenueType
                }).Include(a => a.EventClient.Name)
                                     .ToListAsync();

                return(_viewEventList);
            }
        public async Task <List <EventListVm> > Handle(GetEventListQuery request, CancellationToken cancellationToken)
        {
            var allEvents = (await _eventRepository.ListAllAsync()).OrderBy(x => x.CreatedDate);

            return(_mapper.Map <List <EventListVm> >(allEvents));
        }
 public async Task <IEnumerable <EventListViewModel> > Handle(GetEventListQuery request, CancellationToken cancellationToken)
 {
     throw new NotImplementedException();
 }
 public Task <List <EventListVM> > Handle(GetEventListQuery request, CancellationToken cancellationToken)
 {
     throw new System.NotImplementedException();
 }