public async Task <UserGrantMapping> SaveGrantDetails(UserGrantMapping mappingDetails) { await _context.UserGrantMappings.AddAsync(mappingDetails); await _context.SaveChangesAsync(); return(mappingDetails); }
public async Task <UserGrantMapping> GrantDetails(UserGrantMappingDto mappingDto) { string applicationStatus; if (await _education.EducationDetailsExistsForApplicant(mappingDto.UserId)) { applicationStatus = "Completed"; } else { applicationStatus = "Submitted"; } var mappingDetails = new UserGrantMapping { UserId = mappingDto.UserId, GrantId = mappingDto.GrantId, ApplicationStatus = applicationStatus }; return(await _applicant.SaveGrantDetails(mappingDetails)); }