DateTime instead of DateOnly, fixed warnings
This commit is contained in:
		| @@ -1,13 +1,13 @@ | ||||
| using Domains.ApplicantDomain; | ||||
| using Domains.VisaApplicationDomain; | ||||
| 
 | ||||
| namespace ApplicationLayer; | ||||
| namespace ApplicationLayer.VisaApplication; | ||||
| 
 | ||||
| /// Model of visa request from user | ||||
| public record CreateVisaApplicationRequest( | ||||
|     Name FullName, | ||||
|     Passport Passport, | ||||
|     DateOnly BirthDate, | ||||
|     DateTime BirthDate, | ||||
|     string BirthCity, | ||||
|     string BirthCountry, | ||||
|     string CitizenShip, | ||||
| @@ -16,7 +16,7 @@ namespace Domains.ApplicantDomain | ||||
|         public Passport Passport { get; set; } = null!; | ||||
|  | ||||
|         /// Date of birth of the <see cref="Applicant"/> | ||||
|         public DateOnly BirthDate { get; set; } | ||||
|         public DateTime BirthDate { get; set; } | ||||
|  | ||||
|         /// <see cref="Country"/> of birth of the <see cref="Applicant"/> | ||||
|         public Country CountryOfBirth { get; set; } = null!; | ||||
|   | ||||
| @@ -11,9 +11,9 @@ | ||||
|         public string Issuer { get; set; } = null!; | ||||
|  | ||||
|         /// Date of issue | ||||
|         public DateOnly IssueDate { get; set; } | ||||
|         public DateTime IssueDate { get; set; } | ||||
|  | ||||
|         /// Date when the <see cref="Passport"/> expires | ||||
|         public DateOnly ExpirationDate { get; set; } | ||||
|         public DateTime ExpirationDate { get; set; } | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -9,12 +9,12 @@ namespace Domains.VisaApplicationDomain | ||||
|         public Guid Id { get; private set; } = Guid.NewGuid(); | ||||
|  | ||||
|         /// Date of issue | ||||
|         public DateOnly IssueDate { get; set; } | ||||
|         public DateTime IssueDate { get; set; } | ||||
|  | ||||
|         /// Name of visa | ||||
|         public string Name { get; set; } = null!; | ||||
|  | ||||
|         /// Date when visa expires | ||||
|         public DateOnly ExpirationDate { get; set; } | ||||
|         public DateTime ExpirationDate { get; set; } | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -9,9 +9,9 @@ namespace Domains.VisaApplicationDomain | ||||
|         public Guid Id { get; private set; } = Guid.NewGuid(); | ||||
|  | ||||
|         /// First day of <see cref="PastVisit"/> | ||||
|         public DateOnly StartDate { get; set; } | ||||
|         public DateTime StartDate { get; set; } | ||||
|  | ||||
|         /// Last day of <see cref="PastVisit"/> | ||||
|         public DateOnly EndDate { get; set; } | ||||
|         public DateTime EndDate { get; set; } | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -5,7 +5,7 @@ | ||||
|     public class PermissionToDestCountry | ||||
|     { | ||||
|         /// Date when <see cref="PermissionToDestCountry"/> expires | ||||
|         public DateOnly ExpirationDate { get; set; } | ||||
|         public DateTime ExpirationDate { get; set; } | ||||
|  | ||||
|         /// Issuing authority | ||||
|         public string Issuer { get; set; } = null!; | ||||
|   | ||||
| @@ -8,6 +8,6 @@ | ||||
|         public string Number { get; set; } = null!; | ||||
|  | ||||
|         /// Date when <see cref="ReentryPermit"/> expires | ||||
|         public DateOnly ExpirationDate { get; set; } | ||||
|         public DateTime ExpirationDate { get; set; } | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -43,7 +43,7 @@ namespace Domains.VisaApplicationDomain | ||||
|         public RequestedNumberOfEntries RequestedNumberOfEntries { get; set; } | ||||
|  | ||||
|         /// When application was created | ||||
|         public DateOnly RequestDate { get; set; } | ||||
|         public DateTime RequestDate { get; set; } | ||||
|  | ||||
|         /// Valid days requested | ||||
|         public int ValidDaysRequested { get; set; } | ||||
|   | ||||
| @@ -4,7 +4,7 @@ using Microsoft.EntityFrameworkCore; | ||||
|  | ||||
| namespace Infrastructure.Database | ||||
| { | ||||
|     public class DbContext(DbContextOptions<Infrastructure.Database.DbContext> opts) | ||||
|     public class DbContext(DbContextOptions<DbContext> opts) | ||||
|         : Microsoft.EntityFrameworkCore.DbContext(opts), IGenericWriter, IGenericReader, IUnitOfWork | ||||
|     { | ||||
|         protected override void OnModelCreating(ModelBuilder modelBuilder) | ||||
|   | ||||
| @@ -17,7 +17,7 @@ namespace SchengenVisaApi | ||||
|         } | ||||
|  | ||||
|         /// Add services needed for Presentation layer | ||||
|         private static IServiceCollection AddPresentation(this IServiceCollection services) | ||||
|         private static void AddPresentation(this IServiceCollection services) | ||||
|         { | ||||
|             services.AddControllers(); | ||||
|             services.AddEndpointsApiExplorer(); | ||||
| @@ -26,8 +26,6 @@ namespace SchengenVisaApi | ||||
|                 var xmlFilename = $"{Assembly.GetExecutingAssembly().GetName().Name}.xml"; | ||||
|                 options.IncludeXmlComments(Path.Combine(AppContext.BaseDirectory, xmlFilename)); | ||||
|             }); | ||||
|  | ||||
|             return services; | ||||
|         } | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user