Esempio n. 1
0
 private IEnumerable <string> CreateDateEntries(IEnumerable <DateEntryCreationRequestDTO> requests)
 {
     return(requests.Select(request =>
     {
         IDateEntry newDateEntry = _datesService.Create(request.Date, request.Location, request.Remarks);
         return newDateEntry?.Id;
     }));
 }
Esempio n. 2
0
        public async Task DateCreationWorks()
        {
            const int eventId = 100;

            await firstContext.CreateUser(firstAuth);

            var groupId = await firstGroups.UpsertGroup(DefaultGroup());

            await firstDates.Create(groupId, eventId);

            var dates = await firstDates.List(groupId);

            Assert.Single(dates);
            Assert.Equal(groupId, dates[0].GroupId);
            Assert.Equal(eventId, dates[0].EventId);
        }
 public Task Create([FromRoute] int groupId, [FromRoute] int eventId)
 {
     return(datesService.Create(groupId, eventId));
 }