DateTime instead of DateOnly, fixed warnings

This commit is contained in:
2024-08-15 14:35:55 +03:00
parent 25a9d8f86d
commit a81739214c
10 changed files with 14 additions and 14 deletions

View File

@@ -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,

View File

@@ -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!;

View File

@@ -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; }
}
}

View File

@@ -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; }
}
}

View File

@@ -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; }
}
}

View File

@@ -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!;

View File

@@ -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; }
}
}

View File

@@ -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; }

View File

@@ -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)

View File

@@ -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();