public async Task AddApplicationAsync(ApplicationRequestDto dto, int userId)
        {
            var application = this.mapper.Map <Application>(dto);

            application.UserId = userId;
            application.Status = StatusType.Draft;

            this.dbContext.Applications.Add(application);

            await this.dbContext.SaveChangesAsync();
        }
Esempio n. 2
0
        public async Task PostApplication(ApplicationRequestDto app)
        {
            var userId = this.userContext.UserId.Value;

            await this.appService.AddApplicationAsync(app, userId);
        }