Update SeedData to be executed when MS launched, Enable other properties in SurveyResponse

This commit is contained in:
Reginald Cherenfant Jasmin
2023-09-04 21:31:41 -04:00
parent 81e14c387d
commit a1a9fd1dc5
35 changed files with 279 additions and 288 deletions

View File

@ -18,12 +18,11 @@ namespace DamageAssesment.Api.Answers.Providers
this.answerDbContext = answerDbContext;
this.logger = logger;
this.mapper = mapper;
SeedData();
//SeedData();
}
public async Task<(bool IsSuccess, IEnumerable<Models.Answer> Answers, string ErrorMessage)> GetAnswersAsync()
{
try
{
logger?.LogInformation("Query Question");
@ -188,7 +187,7 @@ namespace DamageAssesment.Api.Answers.Providers
return answerDbContext.Answers.AsNoTracking().Count(e => e.Id == id) > 0;
}
private void SeedData()
public void SeedData()
{
if (!answerDbContext.Answers.Any())
{