Adds refactoring

This commit is contained in:
BinaryAlley committed 2024-08-26 23:32:38 +03:00
1 parent 8b729cc16c
commit ddfaaefa27
39 files changed
+673 -396

No files matched your search

@@ -28,7 +28,7 @@ class Book
Optional<string> appleBooksId, Optional<string> appleBooksId,
List<Isbn> isbns, List<Isbn> isbns,
List<MediaContributorId> contributors, List<MediaContributorId> contributors,
List<Rating> ratings); List<BookRating> ratings);
} }
``` ```
@@ -1,25 +0,0 @@
#region ========================================================================= USING =====================================================================================
using System.Text.Json.Serialization;
#endregion
namespace Lumina.Application.Common.Enums;
/// <summary>
/// Represents the format of a book.
/// </summary>
[JsonConverter(typeof(JsonStringEnumConverter))]
public enum BookFormat
{
Hardcover,
Paperback,
MassMarketPaperback,
TradePaperback,
eBook,
Audiobook,
LargePrint,
BoardBook,
SpiralBound,
LibraryBinding,
LeatherBound,
PopupBook
}
@@ -1,17 +0,0 @@
#region ========================================================================= USING =====================================================================================
using System.Text.Json.Serialization;
#endregion
namespace Lumina.Application.Common.Enums;
/// <summary>
/// Enumeration for the various sources of book ratings.
/// </summary>
[JsonConverter(typeof(JsonStringEnumConverter))]
public enum BookRatingSource
{
User,
Goodreads,
Amazon,
GoogleBooks,
}
@@ -1,15 +0,0 @@
#region ========================================================================= USING =====================================================================================
using System.Text.Json.Serialization;
#endregion
namespace Lumina.Application.Common.Enums;
/// <summary>
/// Enumeration for the different ISBN (International Standard Book Number) formats.
/// </summary>
[JsonConverter(typeof(JsonStringEnumConverter))]
public enum IsbnFormat
{
Isbn10,
Isbn13
}
@@ -1,17 +0,0 @@
#region ========================================================================= USING =====================================================================================
using System.Text.Json.Serialization;
#endregion
namespace Lumina.Application.Common.Enums;
/// <summary>
/// Enumeration for the various roles of media contributors across different types of media.
/// </summary>
[JsonConverter(typeof(JsonStringEnumConverter))]
public enum MediaContributorRole
{
Actor,
Director,
Singer,
Author,
}
@@ -0,0 +1,131 @@
#region ========================================================================= USING =====================================================================================
using Lumina.Application.Common.Models.Books;
using Lumina.Domain.Common.Enums;
using Lumina.Domain.Common.Primitives;
using Lumina.Domain.Common.ValueObjects.Metadata;
using Lumina.Domain.Core.Aggregates.MediaContributor.MediaContributorAggregate.ValueObjects;
using Lumina.Domain.Core.Aggregates.WrittenContentLibrary.BookLibraryAggregate;
using Lumina.Domain.Core.Aggregates.WrittenContentLibrary.BookLibraryAggregate.Entities;
using Lumina.Domain.Core.Aggregates.WrittenContentLibrary.BookLibraryAggregate.ValueObjects;
using Mapster;
#endregion
namespace Lumina.Application.Common.Mapping.WrittenContentLibrary.BookLibrary;
/// <summary>
/// Mapping configuration for books between the domain object and the persistence object.
/// </summary>
public class BookMappingConfig : IRegister
{
#region ===================================================================== METHODS ===================================================================================
/// <summary>
/// Registers the mapping configuration.
/// </summary>
/// <param name="config">The type adapter configuration.</param>
public void Register(TypeAdapterConfig config)
{
config.NewConfig<Book, BookDto>()
.Map(dest => dest.Id, src => src.Id.Value)
.Map(dest => dest.Title, src => src.Metadata.Title)
.Map(dest => dest.OriginalTitle, src => src.Metadata.OriginalTitle.HasValue ? src.Metadata.OriginalTitle.Value : default)
.Map(dest => dest.Description, src => src.Metadata.Description.HasValue ? src.Metadata.Description.Value : default)
.Map(dest => dest.OriginalReleaseDate, src => src.Metadata.ReleaseInfo.OriginalReleaseDate.HasValue ? src.Metadata.ReleaseInfo.OriginalReleaseDate.Value : default)
.Map(dest => dest.OriginalReleaseYear, src => src.Metadata.ReleaseInfo.OriginalReleaseYear.HasValue ? src.Metadata.ReleaseInfo.OriginalReleaseYear.Value : default)
.Map(dest => dest.ReReleaseDate, src => src.Metadata.ReleaseInfo.ReReleaseDate.HasValue ? src.Metadata.ReleaseInfo.ReReleaseDate.Value : default)
.Map(dest => dest.ReReleaseYear, src => src.Metadata.ReleaseInfo.ReReleaseYear.HasValue ? src.Metadata.ReleaseInfo.ReReleaseYear.Value : default)
.Map(dest => dest.ReleaseCountry, src => src.Metadata.ReleaseInfo.ReleaseCountry.HasValue ? src.Metadata.ReleaseInfo.ReleaseCountry.Value : default)
.Map(dest => dest.ReleaseVersion, src => src.Metadata.ReleaseInfo.ReleaseVersion.HasValue ? src.Metadata.ReleaseInfo.ReleaseVersion.Value : default)
.Map(dest => dest.LanguageCode, src => src.Metadata.Language.HasValue ? src.Metadata.Language.Value.LanguageCode : default)
.Map(dest => dest.LanguageName, src => src.Metadata.Language.HasValue ? src.Metadata.Language.Value.LanguageName : default)
.Map(dest => dest.LanguageNativeName, src => src.Metadata.Language.HasValue ? src.Metadata.Language.Value.NativeName : default)
.Map(dest => dest.OriginalLanguageCode, src => src.Metadata.OriginalLanguage.HasValue ? src.Metadata.OriginalLanguage.Value.LanguageCode : default)
.Map(dest => dest.OriginalLanguageName, src => src.Metadata.OriginalLanguage.HasValue ? src.Metadata.OriginalLanguage.Value.LanguageName : default)
.Map(dest => dest.OriginalLanguageNativeName, src => src.Metadata.OriginalLanguage.HasValue ? src.Metadata.OriginalLanguage.Value.NativeName : default)
.Map(dest => dest.Tags, src => src.Metadata.Tags)
.Map(dest => dest.Genres, src => src.Metadata.Genres)
.Map(dest => dest.Publisher, src => src.Metadata.Publisher.HasValue ? src.Metadata.Publisher.Value : default)
.Map(dest => dest.PageCount, src => src.Metadata.PageCount.HasValue ? src.Metadata.PageCount.Value : default)
.Map(dest => dest.Format, src => src.Format.ToString())
.Map(dest => dest.Edition, src => src.Edition.HasValue ? src.Edition.Value : default)
.Map(dest => dest.VolumeNumber, src => src.VolumeNumber.HasValue ? src.VolumeNumber.Value : default)
.Map(dest => dest.ASIN, src => src.ASIN.HasValue ? src.ASIN.Value : default)
.Map(dest => dest.GoodreadsId, src => src.GoodreadsId.HasValue ? src.GoodreadsId.Value : default)
.Map(dest => dest.LCCN, src => src.LCCN.HasValue ? src.LCCN.Value : default)
.Map(dest => dest.OCLCNumber, src => src.OCLCNumber.HasValue ? src.OCLCNumber.Value : default)
.Map(dest => dest.OpenLibraryId, src => src.OpenLibraryId.HasValue ? src.OpenLibraryId.Value : default)
.Map(dest => dest.LibraryThingId, src => src.LibraryThingId.HasValue ? src.LibraryThingId.Value : default)
.Map(dest => dest.GoogleBooksId, src => src.GoogleBooksId.HasValue ? src.GoogleBooksId.Value : default)
.Map(dest => dest.BarnesAndNobleId, src => src.BarnesAndNobleId.HasValue ? src.BarnesAndNobleId.Value : default)
.Map(dest => dest.AppleBooksId, src => src.AppleBooksId.HasValue ? src.AppleBooksId.Value : default)
.Map(dest => dest.ISBNs, src => src.ISBNs)
.Map(dest => dest.Ratings, src => src.Ratings)
.Map(dest => dest.Created, src => src.Created)
.Map(dest => dest.Updated, src => src.Updated);
config.NewConfig<BookRating, BookRatingDto>()
.Map(dest => dest.Value, src => src.Value)
.Map(dest => dest.MaxValue, src => src.MaxValue)
.Map(dest => dest.VoteCount, src => src.VoteCount.HasValue ? src.VoteCount.Value : default)
.Map(dest => dest.Source, src => src.Source.HasValue ? src.Source.Value : default);
config.NewConfig<Optional<BookRatingSource>, BookRatingSource?>()
.MapWith(src => src.HasValue ? src.Value : default);
config.NewConfig<BookDto, Book>()
.MapWith(src => Book.Create(
BookId.Create(src.Id),
WrittenContentMetadata.Create(
src.Title,
Optional<string>.FromNullable(src.OriginalTitle),
Optional<string>.FromNullable(src.Description),
ReleaseInfo.Create(
Optional<DateOnly>.FromNullable(src.OriginalReleaseDate),
Optional<int>.FromNullable(src.OriginalReleaseYear),
Optional<DateOnly>.FromNullable(src.ReReleaseDate),
Optional<int>.FromNullable(src.ReReleaseYear),
Optional<string>.FromNullable(src.ReleaseCountry),
Optional<string>.FromNullable(src.ReleaseVersion)
).Value,
src.Genres.Select(g => Genre.Create(g.Name).Value).ToList(),
src.Tags.Select(t => Tag.Create(t.Name).Value).ToList(),
src.LanguageCode != null ? LanguageInfo.Create(
src.LanguageCode,
src.LanguageName,
Optional<string>.FromNullable(src.LanguageNativeName)
).Value : Optional<LanguageInfo>.None(),
src.OriginalLanguageCode != null ? LanguageInfo.Create(
src.OriginalLanguageCode,
src.OriginalLanguageName,
Optional<string>.FromNullable(src.OriginalLanguageNativeName)
).Value : Optional<LanguageInfo>.None(),
Optional<string>.FromNullable(src.Publisher),
Optional<int>.FromNullable(src.PageCount)
),
Enum.Parse<BookFormat>(src.Format),
Optional<string>.FromNullable(src.Edition),
Optional<int>.FromNullable(src.VolumeNumber),
Optional<BookSeries>.None(), // Assuming BookSeries is not part of BookDto
Optional<string>.FromNullable(src.ASIN),
Optional<string>.FromNullable(src.GoodreadsId),
Optional<string>.FromNullable(src.LCCN),
Optional<string>.FromNullable(src.OCLCNumber),
Optional<string>.FromNullable(src.OpenLibraryId),
Optional<string>.FromNullable(src.LibraryThingId),
Optional<string>.FromNullable(src.GoogleBooksId),
Optional<string>.FromNullable(src.BarnesAndNobleId),
Optional<string>.FromNullable(src.AppleBooksId),
src.ISBNs.Select(i => Isbn.Create(i.Value, i.Format).Value).ToList(),
new List<MediaContributorId>(), // Assuming MediaContributorId is not part of BookDto
src.Ratings.Select(r => BookRating.Create(
r.Value,
r.MaxValue,
Optional<BookRatingSource>.FromNullable(r.Source),
Optional<int>.FromNullable(r.VoteCount)
).Value).ToList()
).Value) // Assuming Create returns ErrorOr<Book>, we take the Value
.Ignore(dest => dest.Created)
.Ignore(dest => dest.Updated);
}
#endregion
}
@@ -1,5 +1,5 @@
#region ========================================================================= USING ===================================================================================== #region ========================================================================= USING =====================================================================================
using Lumina.Application.Common.Enums; using Lumina.Application.Common.Models.Common;
#endregion #endregion
namespace Lumina.Application.Common.Models.Books; namespace Lumina.Application.Common.Models.Books;
@@ -7,22 +7,44 @@ namespace Lumina.Application.Common.Models.Books;
/// <summary> /// <summary>
/// Represents a book. /// Represents a book.
/// </summary> /// </summary>
public record BookDto( public class BookDto : IStorageEntity
WrittenContentMetadataDto Metadata, {
BookFormat Format, public Guid Id { get; init; }
string? Edition, public string Title { get; init; } = null!;
int? VolumeNumber, public string? OriginalTitle { get; init; }
BookSeriesDto? Series, public string? Description { get; init; }
string? ASIN, public DateOnly? OriginalReleaseDate { get; init; }
string? GoodreadsId, public int? OriginalReleaseYear { get; init; }
string? LCCN, public DateOnly? ReReleaseDate { get; init; }
string? OCLCNumber, public int? ReReleaseYear { get; init; }
string? OpenLibraryId, public string? ReleaseCountry { get; init; }
string? LibraryThingId, public string? ReleaseVersion { get; init; }
string? GoogleBooksId, public string? LanguageCode { get; init; }
string? BarnesAndNobleId, public string? LanguageName { get; init; }
string? AppleBooksId, public string? LanguageNativeName { get; init; }
List<IsbnDto> ISBNs, public string? OriginalLanguageCode { get; init; }
List<Guid> Contributors, public string? OriginalLanguageName { get; init; }
List<BookRatingDto> Ratings public string? OriginalLanguageNativeName { get; init; }
); public List<TagDto> Tags { get; init; } = [];
public List<GenreDto> Genres { get; init; } = [];
public string? Publisher { get; init; }
public int? PageCount { get; init; }
public string Format { get; init; } = null!;
public string? Edition { get; init; }
public int? VolumeNumber { get; init; }
//public Guid? BookSeriesId { get; init; } = null;
public string? ASIN { get; init; } = null!;
public string? GoodreadsId { get; init; } = null!;
public string? LCCN { get; init; } = null!;
public string? OCLCNumber { get; init; } = null!;
public string? OpenLibraryId { get; init; } = null!;
public string? LibraryThingId { get; init; } = null!;
public string? GoogleBooksId { get; init; } = null!;
public string? BarnesAndNobleId { get; init; } = null!;
public string? AppleBooksId { get; init; } = null!;
public List<IsbnDto> ISBNs { get; init; } = [];
//public List<ContributorIdDto> ContributorIds { get; init; } = [];
public List<BookRatingDto> Ratings { get; init; } = [];
public DateTime Created { get; set; }
public DateTime? Updated { get; set; }
}
@@ -1,6 +1,6 @@
#region ========================================================================= USING ===================================================================================== #region ========================================================================= USING =====================================================================================
using Lumina.Application.Common.Enums;
using Lumina.Application.Common.Models.Common; using Lumina.Application.Common.Models.Common;
using Lumina.Domain.Common.Enums;
#endregion #endregion
namespace Lumina.Application.Common.Models.Books; namespace Lumina.Application.Common.Models.Books;
@@ -1,5 +1,5 @@
#region ========================================================================= USING ===================================================================================== #region ========================================================================= USING =====================================================================================
using Lumina.Application.Common.Enums; using Lumina.Domain.Common.Enums;
#endregion #endregion
namespace Lumina.Application.Common.Models.Books; namespace Lumina.Application.Common.Models.Books;
@@ -1,5 +1,8 @@
#region ========================================================================= USING ===================================================================================== #region ========================================================================= USING =====================================================================================
using ErrorOr; using ErrorOr;
using Lumina.Application.Common.DataAccess.Repositories.Books;
using Lumina.Application.Common.DataAccess.UoW;
using Lumina.Application.Common.Models.Books;
using Lumina.Domain.Common.Enums; using Lumina.Domain.Common.Enums;
using Lumina.Domain.Common.Primitives; using Lumina.Domain.Common.Primitives;
using Lumina.Domain.Common.ValueObjects.Metadata; using Lumina.Domain.Common.ValueObjects.Metadata;
@@ -7,6 +10,7 @@ using Lumina.Domain.Core.Aggregates.MediaContributor.MediaContributorAggregate.V
using Lumina.Domain.Core.Aggregates.WrittenContentLibrary.BookLibraryAggregate; using Lumina.Domain.Core.Aggregates.WrittenContentLibrary.BookLibraryAggregate;
using Lumina.Domain.Core.Aggregates.WrittenContentLibrary.BookLibraryAggregate.Entities; using Lumina.Domain.Core.Aggregates.WrittenContentLibrary.BookLibraryAggregate.Entities;
using Lumina.Domain.Core.Aggregates.WrittenContentLibrary.BookLibraryAggregate.ValueObjects; using Lumina.Domain.Core.Aggregates.WrittenContentLibrary.BookLibraryAggregate.ValueObjects;
using MapsterMapper;
using Mediator; using Mediator;
#endregion #endregion
@@ -17,6 +21,24 @@ namespace Lumina.Application.Core.WrittenContentLibrary.BooksLibrary.Books.Comma
/// </summary> /// </summary>
public class AddBookCommandHandler : IRequestHandler<AddBookCommand, ErrorOr<Book>> public class AddBookCommandHandler : IRequestHandler<AddBookCommand, ErrorOr<Book>>
{ {
#region ================================================================== FIELD MEMBERS ================================================================================
private readonly IUnitOfWork _unitOfWork;
private readonly IMapper _mapper;
#endregion
#region ====================================================================== CTOR =====================================================================================
/// <summary>
/// Initializes a new instance of the <see cref="AddBookCommandHandler"/> class.
/// </summary>
/// <param name="unitOfWork">Injected unit of work for interacting with the data access layer repositories.</param>
/// <param name="mapper">Injected service for mapping objects.</param>
public AddBookCommandHandler(IUnitOfWork unitOfWork, IMapper mapper)
{
_unitOfWork = unitOfWork;
_mapper = mapper;
}
#endregion
#region ===================================================================== METHODS =================================================================================== #region ===================================================================== METHODS ===================================================================================
/// <summary> /// <summary>
/// Handles the command to add a book. /// Handles the command to add a book.
@@ -29,7 +51,7 @@ public class AddBookCommandHandler : IRequestHandler<AddBookCommand, ErrorOr<Boo
public async ValueTask<ErrorOr<Book>> Handle(AddBookCommand request, CancellationToken cancellationToken) public async ValueTask<ErrorOr<Book>> Handle(AddBookCommand request, CancellationToken cancellationToken)
{ {
// TODO: update Api.Book.md documentation when the functionality is fully implemented // TODO: update Api.Book.md documentation when the functionality is fully implemented
List<MediaContributorId> contributorIds = new(); List<MediaContributorId> contributorIds = [];
foreach(var mediaContributor in request.Contributors) foreach(var mediaContributor in request.Contributors)
{ {
// TODO: add logic to search the media contributors repository for existing contributors, based on the provided names // TODO: add logic to search the media contributors repository for existing contributors, based on the provided names
@@ -49,7 +71,7 @@ public class AddBookCommandHandler : IRequestHandler<AddBookCommand, ErrorOr<Boo
if (errors.Count != 0) // if there are errors, return them if (errors.Count != 0) // if there are errors, return them
return errors; return errors;
List<Rating> domainRatings = domainRatingsResult.Select(rating => rating.Value as Rating).ToList(); List<BookRating> domainRatings = domainRatingsResult.Select(rating => rating.Value).ToList();
var domainGenresResult = request.Metadata.Genres.ConvertAll(genre => Genre.Create(genre.Name)); var domainGenresResult = request.Metadata.Genres.ConvertAll(genre => Genre.Create(genre.Name));
errors = domainGenresResult.Where(genreResult => genreResult.IsError).SelectMany(genreResult => genreResult.Errors).ToList(); errors = domainGenresResult.Where(genreResult => genreResult.IsError).SelectMany(genreResult => genreResult.Errors).ToList();
@@ -137,6 +159,14 @@ public class AddBookCommandHandler : IRequestHandler<AddBookCommand, ErrorOr<Boo
); );
if (createBookResult.IsError) if (createBookResult.IsError)
return createBookResult.Errors; return createBookResult.Errors;
var bookRepository = _unitOfWork.GetRepository<IBookRepository>();
var persistenceBook = _mapper.Map<BookDto>(createBookResult.Value);
var insertBookResult = await bookRepository.InsertAsync(persistenceBook, cancellationToken);
if (insertBookResult.IsError)
return insertBookResult.Errors;
await _unitOfWork.SaveChangesAsync(cancellationToken);
return createBookResult.Value; return createBookResult.Value;
} }
#endregion #endregion
@@ -0,0 +1,12 @@
#region ========================================================================= USING =====================================================================================
using ErrorOr;
using Lumina.Domain.Core.Aggregates.WrittenContentLibrary.BookLibraryAggregate;
using Mediator;
#endregion
namespace Lumina.Application.Core.WrittenContentLibrary.BooksLibrary.Books.Queries;
/// <summary>
/// Query for getting all books.
/// </summary>
public record class GetBooksQuery() : IRequest<ErrorOr<IEnumerable<Book>>>;
@@ -0,0 +1,53 @@
#region ========================================================================= USING =====================================================================================
using ErrorOr;
using Lumina.Application.Common.DataAccess.Repositories.Books;
using Lumina.Application.Common.DataAccess.UoW;
using Lumina.Domain.Core.Aggregates.WrittenContentLibrary.BookLibraryAggregate;
using MapsterMapper;
using Mediator;
#endregion
namespace Lumina.Application.Core.WrittenContentLibrary.BooksLibrary.Books.Queries;
/// <summary>
/// Handler for the query to get all books.
/// </summary>
public class GetBooksQueryHandler : IRequestHandler<GetBooksQuery, ErrorOr<IEnumerable<Book>>>
{
#region ================================================================== FIELD MEMBERS ================================================================================
private readonly IUnitOfWork _unitOfWork;
private readonly IMapper _mapper;
#endregion
#region ====================================================================== CTOR =====================================================================================
/// <summary>
/// Initializes a new instance of the <see cref="GetBooksQueryHandler"/> class.
/// </summary>
/// <param name="unitOfWork">Injected unit of work for interacting with the data access layer repositories.</param>
/// <param name="mapper">Injected service for mapping objects.</param>
public GetBooksQueryHandler(IUnitOfWork unitOfWork, IMapper mapper)
{
_unitOfWork = unitOfWork;
_mapper = mapper;
}
#endregion
#region ===================================================================== METHODS ===================================================================================
/// <summary>
/// Handles the query to get all books.
/// </summary>
/// <param name="request">The request to be handled.</param>
/// <param name="cancellationToken">Cancellation token that can be used to stop the execution.</param>
/// <returns>
/// An <see cref="ErrorOr{T}"/> containing either a collection of <see cref="Book"/>, or an error message.
/// </returns>
public async ValueTask<ErrorOr<IEnumerable<Book>>> Handle(GetBooksQuery request, CancellationToken cancellationToken)
{
var bookRepository = _unitOfWork.GetRepository<IBookRepository>();
var getBooksResult = await bookRepository.GetAllAsync(cancellationToken).ConfigureAwait(false);
if (getBooksResult.IsError)
return getBooksResult.Errors;
return ErrorOrFactory.From(getBooksResult.Value.Select(book => _mapper.Map<Book>(book)));
}
#endregion
}
@@ -1,27 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net8.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<BaseOutputPath>..\..\bin\</BaseOutputPath> <BaseOutputPath>..\..\bin\</BaseOutputPath>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Lumina.Domain\Lumina.Domain.csproj" /> <ProjectReference Include="..\Lumina.Domain\Lumina.Domain.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Mapster" Version="7.4.0" /> <PackageReference Include="Mapster" Version="7.4.0" />
<PackageReference Include="FluentValidation" Version="11.9.2" /> <PackageReference Include="FluentValidation" Version="11.9.2" />
<PackageReference Include="FluentValidation.DependencyInjectionExtensions" Version="11.9.2" /> <PackageReference Include="FluentValidation.DependencyInjectionExtensions" Version="11.9.2" />
<PackageReference Include="Mapster.DependencyInjection" Version="1.0.1" /> <PackageReference Include="Mapster.DependencyInjection" Version="1.0.1" />
<PackageReference Include="Mediator.Abstractions" Version="2.1.7" /> <PackageReference Include="Mediator.Abstractions" Version="2.1.7" />
<PackageReference Include="Mediator.SourceGenerator" Version="2.1.7"> <PackageReference Include="Mediator.SourceGenerator" Version="2.1.7">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" /> <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.1" /> <PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.1" />
</ItemGroup> </ItemGroup>
</Project> </Project>
@@ -4,20 +4,11 @@
/// Base class for all domain Aggregate Roots. /// Base class for all domain Aggregate Roots.
/// </summary> /// </summary>
/// <typeparam name="TId">The type representing the unique identifier for the Aggregate Root. It should be a non-nullable type.</typeparam> /// <typeparam name="TId">The type representing the unique identifier for the Aggregate Root. It should be a non-nullable type.</typeparam>
/// <typeparam name="TIdType">The type of the unique identifier for the Aggregate Root. It should be a non-nullable type.</typeparam> public abstract class AggregateRoot<TId> : Entity<TId> where TId : notnull
public abstract class AggregateRoot<TId, TIdType> : Entity<TId> where TId : notnull, AggregateRootId<TIdType>
where TIdType : notnull
{ {
#region ==================================================================== PROPERTIES =================================================================================
/// <summary>
/// Gets the unique identifier of the Aggregate Root.
/// </summary>
public new AggregateRootId<TIdType> Id { get; protected set; }
#endregion
#region ====================================================================== CTOR ===================================================================================== #region ====================================================================== CTOR =====================================================================================
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="AggregateRoot{TId, TIdType}"/> class. /// Initializes a new instance of the <see cref="AggregateRoot{TId}"/> class.
/// </summary> /// </summary>
/// <param name="id">The id of the entity.</param> /// <param name="id">The id of the entity.</param>
protected AggregateRoot(TId id) : base(id) protected AggregateRoot(TId id) : base(id)
@@ -27,7 +18,7 @@ public abstract class AggregateRoot<TId, TIdType> : Entity<TId> where TId : notn
#pragma warning disable CS8618 #pragma warning disable CS8618
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="AggregateRoot{TId, TIdType}"/> class. /// Initializes a new instance of the <see cref="AggregateRoot{TId}"/> class.
/// </summary> /// </summary>
protected AggregateRoot() // only needed during reflection protected AggregateRoot() // only needed during reflection
{ {
@@ -1,15 +0,0 @@
namespace Lumina.Domain.Common.Models.Core;
/// <summary>
/// Base identity class for all domain Aggregate Roots.
/// </summary>
/// <typeparam name="TId">The type representing the unique identifier for the Aggregate Root. It should be a non-nullable type.</typeparam>
public abstract class AggregateRootId<TId> : ValueObject where TId : notnull
{
#region ==================================================================== PROPERTIES =================================================================================
/// <summary>
/// Gets the unique identifier of the Aggregate Root.
/// </summary>
public abstract TId Value { get; protected set; }
#endregion
}
@@ -11,6 +11,16 @@ public abstract class Entity<TId> : IEquatable<Entity<TId>> where TId : notnull
/// Gets the unique identifier of the entity. /// Gets the unique identifier of the entity.
/// </summary> /// </summary>
public TId Id { get; protected set; } public TId Id { get; protected set; }
/// <summary>
/// Gets the date and time when the entity was created.
/// </summary>
public DateTime Created { get; set; }
/// <summary>
/// Gets the date and time when the entity was last updated.
/// </summary>
public DateTime? Updated { get; set; }
#endregion #endregion
#region ====================================================================== CTOR ===================================================================================== #region ====================================================================== CTOR =====================================================================================
@@ -0,0 +1,57 @@
#region ========================================================================= USING =====================================================================================
using System.Diagnostics;
#endregion
namespace Lumina.Domain.Common.Models.Core;
/// <summary>
/// Base class for all entity identifiers.
/// </summary>
/// <typeparam name="TId">The type of the identifier.</typeparam>
[DebuggerDisplay("{Value}")]
public abstract class EntityId<TId> : ValueObject
{
#region ==================================================================== PROPERTIES =================================================================================
public TId Value { get; }
#endregion
#region ====================================================================== CTOR =====================================================================================
/// <summary>
/// Overload C-tor.
/// </summary>
/// <param name="value">The value representing this object.</param>
protected EntityId(TId value)
{
Value = value;
}
#pragma warning disable CS8618
/// <summary>
/// Default C-tor.
/// </summary>
protected EntityId()
{
}
#pragma warning restore CS8618
#endregion
#region ===================================================================== METHODS ===================================================================================
/// <summary>
/// Gets the list of items that define equality of the object.
/// </summary>
/// <returns>A list of items defining the equality.</returns>
public override IEnumerable<object?> GetEqualityComponents()
{
yield return Value;
}
/// <summary>
/// Customized ToString() method.
/// </summary>
/// <returns>Custom string value showing relevant data for current class.</returns>
public override string? ToString()
{
return Value?.ToString() ?? base.ToString();
}
#endregion
}
@@ -11,7 +11,7 @@ public abstract class ValueObject : IEquatable<ValueObject>
/// Gets the list of items that define equality of the object. /// Gets the list of items that define equality of the object.
/// </summary> /// </summary>
/// <returns>A list of items defining the equality.</returns> /// <returns>A list of items defining the equality.</returns>
public abstract IEnumerable<object> GetEqualityComponents(); public abstract IEnumerable<object?> GetEqualityComponents();
/// <summary> /// <summary>
/// Indicates whether the current object is equal to another object of the same type. /// Indicates whether the current object is equal to another object of the same type.
@@ -42,7 +42,7 @@ public abstract class ValueObject : IEquatable<ValueObject>
/// <param name="left">The left operand of equality.</param> /// <param name="left">The left operand of equality.</param>
/// <param name="right">The right operand of equality.</param> /// <param name="right">The right operand of equality.</param>
/// <returns><see langword="true"/> if <paramref name="left"/> is equal to <paramref name="right"/>, <see langword="false"/> otherwise.</returns> /// <returns><see langword="true"/> if <paramref name="left"/> is equal to <paramref name="right"/>, <see langword="false"/> otherwise.</returns>
public static bool operator ==(ValueObject left, ValueObject right) public static bool operator ==(ValueObject? left, ValueObject? right)
{ {
return Equals(left, right); return Equals(left, right);
} }
@@ -53,7 +53,7 @@ public abstract class ValueObject : IEquatable<ValueObject>
/// <param name="left">The left operand of equality.</param> /// <param name="left">The left operand of equality.</param>
/// <param name="right">The right operand of equality.</param> /// <param name="right">The right operand of equality.</param>
/// <returns><see langword="true"/> if <paramref name="left"/> is not equal to <paramref name="right"/>, <see langword="false"/> otherwise.</returns> /// <returns><see langword="true"/> if <paramref name="left"/> is not equal to <paramref name="right"/>, <see langword="false"/> otherwise.</returns>
public static bool operator !=(ValueObject left, ValueObject right) public static bool operator !=(ValueObject? left, ValueObject? right)
{ {
return !Equals(left, right); return !Equals(left, right);
} }
@@ -91,5 +91,14 @@ public readonly struct Optional<T>
{ {
return value.HasValue ? Some(value.Value) : None(); return value.HasValue ? Some(value.Value) : None();
} }
/// <summary>
/// Customized ToString() method.
/// </summary>
/// <returns>Custom string value showing relevant data for current class.</returns>
public override string ToString()
{
return HasValue ? Value?.ToString()! : string.Empty;
}
#endregion #endregion
} }
@@ -17,17 +17,17 @@ public class LanguageInfo : ValueObject
/// <summary> /// <summary>
/// Gets the ISO 639-1 two-letter language code. /// Gets the ISO 639-1 two-letter language code.
/// </summary> /// </summary>
public string LanguageCode { get; } public string LanguageCode { get; private set; }
/// <summary> /// <summary>
/// Gets the full name of the language in English. /// Gets the full name of the language in English.
/// </summary> /// </summary>
public string LanguageName { get; } public string LanguageName { get; private set; }
/// <summary> /// <summary>
/// Gets an optional native name of the language. /// Gets an optional native name of the language.
/// </summary> /// </summary>
public Optional<string> NativeName { get; } public Optional<string> NativeName { get; private set; }
#endregion #endregion
#region ====================================================================== CTOR ===================================================================================== #region ====================================================================== CTOR =====================================================================================
@@ -14,7 +14,7 @@ namespace Lumina.Domain.Core.Aggregates.MediaContributor.MediaContributorAggrega
/// Aggregate Root for a media contributor. /// Aggregate Root for a media contributor.
/// </summary> /// </summary>
[DebuggerDisplay("{Id}: {Name}")] [DebuggerDisplay("{Id}: {Name}")]
public class MediaContributor : AggregateRoot<MediaContributorId, Guid> public class MediaContributor : AggregateRoot<MediaContributorId>
{ {
#region ==================================================================== PROPERTIES ================================================================================= #region ==================================================================== PROPERTIES =================================================================================
/// <summary> /// <summary>
@@ -7,23 +7,15 @@ namespace Lumina.Domain.Core.Aggregates.MediaContributor.MediaContributorAggrega
/// <summary> /// <summary>
/// Value Object for the Id of a media contributor. /// Value Object for the Id of a media contributor.
/// </summary> /// </summary>
public sealed class MediaContributorId : AggregateRootId<Guid> public sealed class MediaContributorId : EntityId<Guid>
{ {
#region ==================================================================== PROPERTIES =================================================================================
/// <summary>
/// Gets the value of this object.
/// </summary>
public override Guid Value { get; protected set; }
#endregion
#region ====================================================================== CTOR ===================================================================================== #region ====================================================================== CTOR =====================================================================================
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="MediaContributorId"/> class. /// Initializes a new instance of the <see cref="MediaContributorId"/> class.
/// </summary> /// </summary>
/// <param name="value">The value representing this object.</param> /// <param name="value">The value representing this object.</param>
private MediaContributorId(Guid value) private MediaContributorId(Guid value) : base(value)
{ {
Value = value;
} }
#endregion #endregion
@@ -16,11 +16,11 @@ namespace Lumina.Domain.Core.Aggregates.WrittenContentLibrary.BookLibraryAggrega
/// Aggregate root for a book. /// Aggregate root for a book.
/// </summary> /// </summary>
[DebuggerDisplay("{Id}: {Title}")] [DebuggerDisplay("{Id}: {Title}")]
public sealed class Book : AggregateRoot<BookId, Guid> public sealed class Book : AggregateRoot<BookId>
{ {
#region ================================================================== FIELD MEMBERS ================================================================================ #region ================================================================== FIELD MEMBERS ================================================================================
private readonly List<MediaContributorId> _contributors; private readonly List<MediaContributorId> _contributors;
private readonly List<Rating> _ratings; private readonly List<BookRating> _ratings;
private readonly List<Isbn> _isbns; private readonly List<Isbn> _isbns;
#endregion #endregion
@@ -114,7 +114,7 @@ public sealed class Book : AggregateRoot<BookId, Guid>
/// <summary> /// <summary>
/// Gets the list of ratings for this book. /// Gets the list of ratings for this book.
/// </summary> /// </summary>
public IReadOnlyCollection<Rating> Ratings public IReadOnlyCollection<BookRating> Ratings
{ {
get { return _ratings.AsReadOnly(); } get { return _ratings.AsReadOnly(); }
} }
@@ -160,7 +160,7 @@ public sealed class Book : AggregateRoot<BookId, Guid>
Optional<string> appleBooksId, Optional<string> appleBooksId,
List<Isbn> isbns, List<Isbn> isbns,
List<MediaContributorId> contributors, List<MediaContributorId> contributors,
List<Rating> ratings) : base(id) List<BookRating> ratings) : base(id)
{ {
Id = id; Id = id;
Metadata = metadata; Metadata = metadata;
@@ -234,7 +234,7 @@ public sealed class Book : AggregateRoot<BookId, Guid>
Optional<string> appleBooksId, Optional<string> appleBooksId,
List<Isbn> isbns, List<Isbn> isbns,
List<MediaContributorId> contributors, List<MediaContributorId> contributors,
List<Rating> ratings) List<BookRating> ratings)
{ {
// TODO: enforce invariants // TODO: enforce invariants
return new Book( return new Book(
@@ -300,7 +300,7 @@ public sealed class Book : AggregateRoot<BookId, Guid>
Optional<string> appleBooksId, Optional<string> appleBooksId,
List<Isbn> isbns, List<Isbn> isbns,
List<MediaContributorId> contributors, List<MediaContributorId> contributors,
List<Rating> ratings) List<BookRating> ratings)
{ {
// TODO: enforce invariants // TODO: enforce invariants
return new Book( return new Book(
@@ -7,23 +7,15 @@ namespace Lumina.Domain.Core.Aggregates.WrittenContentLibrary.BookLibraryAggrega
/// <summary> /// <summary>
/// Value Object for the Id of a book. /// Value Object for the Id of a book.
/// </summary> /// </summary>
public sealed class BookId : AggregateRootId<Guid> public sealed class BookId : EntityId<Guid>
{ {
#region ==================================================================== PROPERTIES =================================================================================
/// <summary>
/// Gets the value of the <see cref="BookId"/>.
/// </summary>
public override Guid Value { get; protected set; }
#endregion
#region ====================================================================== CTOR ===================================================================================== #region ====================================================================== CTOR =====================================================================================
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="BookId"/> class. /// Initializes a new instance of the <see cref="BookId"/> class.
/// </summary> /// </summary>
/// <param name="value">The value representing this object.</param> /// <param name="value">The value representing this object.</param>
private BookId(Guid value) private BookId(Guid value) : base(value)
{ {
Value = value;
} }
#endregion #endregion
+9 -9
View File
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net8.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<BaseOutputPath>..\..\bin\</BaseOutputPath> <BaseOutputPath>..\..\bin\</BaseOutputPath>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="ErrorOr" Version="2.0.1" /> <PackageReference Include="ErrorOr" Version="2.0.1" />
</ItemGroup> </ItemGroup>
</Project> </Project>
@@ -1,33 +1,33 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net8.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<BaseOutputPath>..\..\bin\</BaseOutputPath> <BaseOutputPath>..\..\bin\</BaseOutputPath>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="FluentValidation" Version="11.9.2" /> <PackageReference Include="FluentValidation" Version="11.9.2" />
<PackageReference Include="Microsoft.Extensions.Options" Version="8.0.2" /> <PackageReference Include="Microsoft.Extensions.Options" Version="8.0.2" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="8.0.0" /> <PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" /> <PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" /> <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.1" /> <PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.1" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Update="appsettings.shared.json"> <None Update="appsettings.shared.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<None Update="appsettings.shared.Development.json"> <None Update="appsettings.shared.Development.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<DependentUpon>appsettings.shared.json</DependentUpon> <DependentUpon>appsettings.shared.json</DependentUpon>
</None> </None>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Lumina.Application\Lumina.Application.csproj" /> <ProjectReference Include="..\Lumina.Application\Lumina.Application.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>
@@ -1,7 +1,7 @@
#region ========================================================================= USING ===================================================================================== #region ========================================================================= USING =====================================================================================
using Lumina.Application.Common.Enums;
using Lumina.Application.Common.Models.Books; using Lumina.Application.Common.Models.Books;
using Lumina.Application.Common.Models.Contributors; using Lumina.Application.Common.Models.Contributors;
using Lumina.Domain.Common.Enums;
#endregion #endregion
namespace Lumina.Presentation.Api.Common.Contracts.Books; namespace Lumina.Presentation.Api.Common.Contracts.Books;
@@ -7,7 +7,7 @@ using Mapster;
namespace Lumina.Presentation.Api.Common.Mapping; namespace Lumina.Presentation.Api.Common.Mapping;
/// <summary> /// <summary>
/// Mapping configuration for books. /// Mapping configuration for books between the API request object and the command object.
/// </summary> /// </summary>
public class BookMappingConfig : IRegister public class BookMappingConfig : IRegister
{ {
@@ -1,5 +1,6 @@
#region ========================================================================= USING ===================================================================================== #region ========================================================================= USING =====================================================================================
using Lumina.Application.Core.WrittenContentLibrary.BooksLibrary.Books.Commands; using Lumina.Application.Core.WrittenContentLibrary.BooksLibrary.Books.Commands;
using Lumina.Application.Core.WrittenContentLibrary.BooksLibrary.Books.Queries;
using Lumina.Presentation.Api.Common.Contracts.Books; using Lumina.Presentation.Api.Common.Contracts.Books;
using Lumina.Presentation.Api.Controllers.Common; using Lumina.Presentation.Api.Controllers.Common;
using MapsterMapper; using MapsterMapper;
@@ -41,9 +42,8 @@ public class BooksController : ApiController
[HttpGet()] [HttpGet()]
public async Task<IActionResult> GetBooks() public async Task<IActionResult> GetBooks()
{ {
// ErrorOr<IEnumerable<BookDto>> result = await mediator.Send(new GetBooksQuery()); var result = await _mediator.Send(new GetBooksQuery());
// return result.Match(result => Ok(result), errors => Problem(errors)); return result.Match(result => Ok(result), errors => Problem(errors));
return Ok(new List<string> { "Book 1", "Book 2", "Book 3" });
} }
/// <summary> /// <summary>
@@ -1,39 +1,44 @@
<Project Sdk="Microsoft.NET.Sdk.Web"> <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net8.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<BaseOutputPath>..\..\bin\</BaseOutputPath> <BaseOutputPath>..\..\bin\</BaseOutputPath>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Mapster" Version="7.4.0" /> <PackageReference Include="Mapster" Version="7.4.0" />
<PackageReference Include="Mapster.DependencyInjection" Version="1.0.1" /> <PackageReference Include="Mapster.DependencyInjection" Version="1.0.1" />
<PackageReference Include="Mediator.Abstractions" Version="2.1.7" /> <PackageReference Include="Mediator.Abstractions" Version="2.1.7" />
<PackageReference Include="Mediator.SourceGenerator" Version="2.1.7"> <PackageReference Include="Mediator.SourceGenerator" Version="2.1.7">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
</PackageReference> </PackageReference>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="5.1.0" /> <PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="5.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer" Version="5.1.0" /> <PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer" Version="5.1.0" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.7" /> <PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.8" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" /> <PackageReference Include="Swashbuckle.AspNetCore" Version="6.7.3" />
</ItemGroup> <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.8">
<PrivateAssets>all</PrivateAssets>
<ItemGroup> <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<None Update="appsettings.json"> </PackageReference>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </ItemGroup>
</None>
<None Update="appsettings.Development.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<DependentUpon>appsettings.shared.json</DependentUpon>
</None>
</ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Lumina.Application\Lumina.Application.csproj" /> <None Update="appsettings.json">
<ProjectReference Include="..\Lumina.Infrastructure\Lumina.Infrastructure.csproj" /> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</ItemGroup> </None>
<None Update="appsettings.Development.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<DependentUpon>appsettings.shared.json</DependentUpon>
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Lumina.Application\Lumina.Application.csproj" />
<ProjectReference Include="..\Lumina.Infrastructure\Lumina.Infrastructure.csproj" />
<ProjectReference Include="..\Lumina.DataAccess\Lumina.DataAccess.csproj" />
</ItemGroup>
</Project> </Project>
+2
View File
@@ -2,6 +2,7 @@
using Lumina.Presentation.Api.Common.DependencyInjection; using Lumina.Presentation.Api.Common.DependencyInjection;
using Lumina.Application.Common.DependencyInjection; using Lumina.Application.Common.DependencyInjection;
using Lumina.Infrastructure.Common.DependencyInjection; using Lumina.Infrastructure.Common.DependencyInjection;
using Lumina.DataAccess.Common.DependencyInjection;
#endregion #endregion
namespace Lumina.Presentation.Api; namespace Lumina.Presentation.Api;
@@ -26,6 +27,7 @@ public class Program
builder.Services.AddApplicationLayerServices(); builder.Services.AddApplicationLayerServices();
builder.Services.AddPresentationApiLayerServices(); builder.Services.AddPresentationApiLayerServices();
builder.Services.AddInfrastructureLayerServices(); builder.Services.AddInfrastructureLayerServices();
builder.Services.AddDataAccessLayerServices();
var app = builder.Build(); var app = builder.Build();
@@ -1,15 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly"> <Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net8.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<BaseOutputPath>..\..\bin\</BaseOutputPath> <BaseOutputPath>..\..\bin\</BaseOutputPath>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.7" /> <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.7" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.7" PrivateAssets="all" /> <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.7" PrivateAssets="all" />
</ItemGroup> </ItemGroup>
</Project> </Project>
+71 -11
View File
@@ -3,27 +3,65 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17 # Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59 VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lumina.Application", "Lumina.Application\Lumina.Application.csproj", "{7B2671B3-E9C5-41AD-BB0C-692238558197}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lumina.Application", "Lumina.Application\Lumina.Application.csproj", "{7B2671B3-E9C5-41AD-BB0C-692238558197}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lumina.DataAccess", "Lumina.DataAccess\Lumina.DataAccess.csproj", "{7FEA2A01-1660-4D18-B05D-83D356FD7828}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lumina.DataAccess", "Lumina.DataAccess\Lumina.DataAccess.csproj", "{7FEA2A01-1660-4D18-B05D-83D356FD7828}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lumina.Domain", "Lumina.Domain\Lumina.Domain.csproj", "{9FF9D5FA-1D0C-4743-87E3-CC8C08694CAC}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lumina.Domain", "Lumina.Domain\Lumina.Domain.csproj", "{9FF9D5FA-1D0C-4743-87E3-CC8C08694CAC}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lumina.Infrastructure", "Lumina.Infrastructure\Lumina.Infrastructure.csproj", "{D43E63EA-2210-471E-BFED-D1D33D196554}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lumina.Infrastructure", "Lumina.Infrastructure\Lumina.Infrastructure.csproj", "{D43E63EA-2210-471E-BFED-D1D33D196554}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lumina.Presentation.Api", "Lumina.Presentation.Api\Lumina.Presentation.Api.csproj", "{7A49A922-127C-4786-84B7-53E64D816336}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lumina.Presentation.Api", "Lumina.Presentation.Api\Lumina.Presentation.Api.csproj", "{7A49A922-127C-4786-84B7-53E64D816336}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lumina.Presentation.Web", "Lumina.Presentation.Web\Lumina.Presentation.Web.csproj", "{FABC255B-0D21-4A0A-A0E2-7759D929B4D3}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lumina.Presentation.Web", "Lumina.Presentation.Web\Lumina.Presentation.Web.csproj", "{FABC255B-0D21-4A0A-A0E2-7759D929B4D3}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lumina.Application.UnitTests", "..\tests\UnitTests\Lumina.Application.UnitTests\Lumina.Application.UnitTests.csproj", "{4DEA94AF-D592-4187-8850-A569C93256C9}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lumina.Application.UnitTests", "..\tests\UnitTests\Lumina.Application.UnitTests\Lumina.Application.UnitTests.csproj", "{4DEA94AF-D592-4187-8850-A569C93256C9}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lumina.Infrastructure.UnitTests", "..\tests\UnitTests\Lumina.Infrastructure.UnitTests\Lumina.Infrastructure.UnitTests.csproj", "{8DB5300A-B38A-4F6D-8FF7-A722DA47667E}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lumina.Infrastructure.UnitTests", "..\tests\UnitTests\Lumina.Infrastructure.UnitTests\Lumina.Infrastructure.UnitTests.csproj", "{8DB5300A-B38A-4F6D-8FF7-A722DA47667E}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lumina.DataAccess.UnitTests", "..\tests\UnitTests\Lumina.DataAccess.UnitTests\Lumina.DataAccess.UnitTests.csproj", "{6050F6A9-F136-4B7B-82D2-57E689463ACA}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lumina.DataAccess.UnitTests", "..\tests\UnitTests\Lumina.DataAccess.UnitTests\Lumina.DataAccess.UnitTests.csproj", "{6050F6A9-F136-4B7B-82D2-57E689463ACA}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lumina.Domain.UnitTests", "..\tests\UnitTests\Lumina.Domain.UnitTests\Lumina.Domain.UnitTests.csproj", "{3BB42EB9-A0A3-4E3F-9053-785F429714AE}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lumina.Domain.UnitTests", "..\tests\UnitTests\Lumina.Domain.UnitTests\Lumina.Domain.UnitTests.csproj", "{3BB42EB9-A0A3-4E3F-9053-785F429714AE}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lumina.Presentation.Api.UnitTests", "..\tests\UnitTests\Lumina.Presentation.Api.UnitTests\Lumina.Presentation.Api.UnitTests.csproj", "{4D5E4789-8437-4F3B-883E-28BBF8A4848F}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lumina.Presentation.Api.UnitTests", "..\tests\UnitTests\Lumina.Presentation.Api.UnitTests\Lumina.Presentation.Api.UnitTests.csproj", "{4D5E4789-8437-4F3B-883E-28BBF8A4848F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{3C316ABB-08D5-4450-9A4E-91059DB54254}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{16E590D3-DD9F-4B45-BF19-C6E317A57D11}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "UnitTests", "UnitTests", "{53B1231B-37F5-44BA-80D5-DBA979775F5C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{ACD16983-F1BD-4A92-B282-95BA8C456F6A}"
ProjectSection(SolutionItems) = preProject
..\docs\LICENSE.md = ..\docs\LICENSE.md
..\README.md = ..\README.md
..\docs\SOURCES.md = ..\docs\SOURCES.md
..\docs\USAGE.md = ..\docs\USAGE.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "technical", "technical", "{0C0E5A56-AD29-4D0B-AB87-E865F8B933E2}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "api", "api", "{B045C2EC-3ACB-47D3-BE62-7AC334B023D9}"
ProjectSection(SolutionItems) = preProject
..\docs\technical\api\Api.Book.md = ..\docs\technical\api\Api.Book.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "domain", "domain", "{4F8D14A3-A465-4EC2-B175-A188B113AB99}"
ProjectSection(SolutionItems) = preProject
..\docs\technical\domain\Aggregates.FileManagement.md = ..\docs\technical\domain\Aggregates.FileManagement.md
..\docs\technical\domain\Aggregates.VideoLibrary.md = ..\docs\technical\domain\Aggregates.VideoLibrary.md
..\docs\technical\domain\Aggregates.WrittenContentLibrary.md = ..\docs\technical\domain\Aggregates.WrittenContentLibrary.md
..\docs\technical\domain\Common.Metadata.md = ..\docs\technical\domain\Common.Metadata.md
..\docs\technical\domain\UbiquitousLanguage.md = ..\docs\technical\domain\UbiquitousLanguage.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "requests", "requests", "{C17A1188-FA69-42BC-92E6-4F91D31B3A58}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "books", "books", "{FAFD9E43-508B-4F20-8AA2-8CADA697ED2D}"
ProjectSection(SolutionItems) = preProject
..\docs\technical\requests\books\Add.http = ..\docs\technical\requests\books\Add.http
..\docs\technical\requests\books\GetAll.http = ..\docs\technical\requests\books\GetAll.http
EndProjectSection
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -79,4 +117,26 @@ Global
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
EndGlobalSection EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{7B2671B3-E9C5-41AD-BB0C-692238558197} = {3C316ABB-08D5-4450-9A4E-91059DB54254}
{7FEA2A01-1660-4D18-B05D-83D356FD7828} = {3C316ABB-08D5-4450-9A4E-91059DB54254}
{9FF9D5FA-1D0C-4743-87E3-CC8C08694CAC} = {3C316ABB-08D5-4450-9A4E-91059DB54254}
{D43E63EA-2210-471E-BFED-D1D33D196554} = {3C316ABB-08D5-4450-9A4E-91059DB54254}
{7A49A922-127C-4786-84B7-53E64D816336} = {3C316ABB-08D5-4450-9A4E-91059DB54254}
{FABC255B-0D21-4A0A-A0E2-7759D929B4D3} = {3C316ABB-08D5-4450-9A4E-91059DB54254}
{4DEA94AF-D592-4187-8850-A569C93256C9} = {53B1231B-37F5-44BA-80D5-DBA979775F5C}
{8DB5300A-B38A-4F6D-8FF7-A722DA47667E} = {53B1231B-37F5-44BA-80D5-DBA979775F5C}
{6050F6A9-F136-4B7B-82D2-57E689463ACA} = {53B1231B-37F5-44BA-80D5-DBA979775F5C}
{3BB42EB9-A0A3-4E3F-9053-785F429714AE} = {53B1231B-37F5-44BA-80D5-DBA979775F5C}
{4D5E4789-8437-4F3B-883E-28BBF8A4848F} = {53B1231B-37F5-44BA-80D5-DBA979775F5C}
{53B1231B-37F5-44BA-80D5-DBA979775F5C} = {16E590D3-DD9F-4B45-BF19-C6E317A57D11}
{0C0E5A56-AD29-4D0B-AB87-E865F8B933E2} = {ACD16983-F1BD-4A92-B282-95BA8C456F6A}
{B045C2EC-3ACB-47D3-BE62-7AC334B023D9} = {0C0E5A56-AD29-4D0B-AB87-E865F8B933E2}
{4F8D14A3-A465-4EC2-B175-A188B113AB99} = {0C0E5A56-AD29-4D0B-AB87-E865F8B933E2}
{C17A1188-FA69-42BC-92E6-4F91D31B3A58} = {0C0E5A56-AD29-4D0B-AB87-E865F8B933E2}
{FAFD9E43-508B-4F20-8AA2-8CADA697ED2D} = {C17A1188-FA69-42BC-92E6-4F91D31B3A58}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4A55A28E-C657-4A0B-95EA-2931AE66004E}
EndGlobalSection
EndGlobal EndGlobal
@@ -1,31 +1,31 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net8.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject> <IsTestProject>true</IsTestProject>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="AutoFixture.AutoNSubstitute" Version="4.18.1" /> <PackageReference Include="AutoFixture.AutoNSubstitute" Version="4.18.1" />
<PackageReference Include="AutoFixture.Xunit2" Version="4.18.1" /> <PackageReference Include="AutoFixture.Xunit2" Version="4.18.1" />
<PackageReference Include="coverlet.collector" Version="6.0.0" /> <PackageReference Include="coverlet.collector" Version="6.0.0" />
<PackageReference Include="FluentAssertions" Version="6.12.0" /> <PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" /> <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="NSubstitute" Version="5.1.0" /> <PackageReference Include="NSubstitute" Version="5.1.0" />
<PackageReference Include="xunit" Version="2.5.3" /> <PackageReference Include="xunit" Version="2.5.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3" /> <PackageReference Include="xunit.runner.visualstudio" Version="2.5.3" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Using Include="Xunit" /> <Using Include="Xunit" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\src\Lumina.Application\Lumina.Application.csproj" /> <ProjectReference Include="..\..\..\src\Lumina.Application\Lumina.Application.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>
@@ -1,31 +1,31 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net8.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject> <IsTestProject>true</IsTestProject>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="AutoFixture.AutoNSubstitute" Version="4.18.1" /> <PackageReference Include="AutoFixture.AutoNSubstitute" Version="4.18.1" />
<PackageReference Include="AutoFixture.Xunit2" Version="4.18.1" /> <PackageReference Include="AutoFixture.Xunit2" Version="4.18.1" />
<PackageReference Include="coverlet.collector" Version="6.0.0" /> <PackageReference Include="coverlet.collector" Version="6.0.0" />
<PackageReference Include="FluentAssertions" Version="6.12.0" /> <PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" /> <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="NSubstitute" Version="5.1.0" /> <PackageReference Include="NSubstitute" Version="5.1.0" />
<PackageReference Include="xunit" Version="2.5.3" /> <PackageReference Include="xunit" Version="2.5.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3" /> <PackageReference Include="xunit.runner.visualstudio" Version="2.5.3" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Using Include="Xunit" /> <Using Include="Xunit" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\src\Lumina.DataAccess\Lumina.DataAccess.csproj" /> <ProjectReference Include="..\..\..\src\Lumina.DataAccess\Lumina.DataAccess.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>
@@ -1,31 +1,31 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net8.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject> <IsTestProject>true</IsTestProject>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="AutoFixture.AutoNSubstitute" Version="4.18.1" /> <PackageReference Include="AutoFixture.AutoNSubstitute" Version="4.18.1" />
<PackageReference Include="AutoFixture.Xunit2" Version="4.18.1" /> <PackageReference Include="AutoFixture.Xunit2" Version="4.18.1" />
<PackageReference Include="coverlet.collector" Version="6.0.0" /> <PackageReference Include="coverlet.collector" Version="6.0.0" />
<PackageReference Include="FluentAssertions" Version="6.12.0" /> <PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" /> <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="NSubstitute" Version="5.1.0" /> <PackageReference Include="NSubstitute" Version="5.1.0" />
<PackageReference Include="xunit" Version="2.5.3" /> <PackageReference Include="xunit" Version="2.5.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3" /> <PackageReference Include="xunit.runner.visualstudio" Version="2.5.3" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Using Include="Xunit" /> <Using Include="Xunit" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\src\Lumina.Domain\Lumina.Domain.csproj" /> <ProjectReference Include="..\..\..\src\Lumina.Domain\Lumina.Domain.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>
@@ -1,32 +1,32 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net8.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject> <IsTestProject>true</IsTestProject>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="AutoFixture.AutoNSubstitute" Version="4.18.1" /> <PackageReference Include="AutoFixture.AutoNSubstitute" Version="4.18.1" />
<PackageReference Include="AutoFixture.Xunit2" Version="4.18.1" /> <PackageReference Include="AutoFixture.Xunit2" Version="4.18.1" />
<PackageReference Include="coverlet.collector" Version="6.0.0" /> <PackageReference Include="coverlet.collector" Version="6.0.0" />
<PackageReference Include="FluentAssertions" Version="6.12.0" /> <PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" /> <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="NSubstitute" Version="5.1.0" /> <PackageReference Include="NSubstitute" Version="5.1.0" />
<PackageReference Include="xunit" Version="2.5.3" /> <PackageReference Include="xunit" Version="2.5.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3" /> <PackageReference Include="xunit.runner.visualstudio" Version="2.5.3" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Using Include="Xunit" /> <Using Include="Xunit" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\src\Lumina.Infrastructure\Lumina.Infrastructure.csproj" /> <ProjectReference Include="..\..\..\src\Lumina.Infrastructure\Lumina.Infrastructure.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>
@@ -1,31 +1,31 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net8.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject> <IsTestProject>true</IsTestProject>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="AutoFixture.AutoNSubstitute" Version="4.18.1" /> <PackageReference Include="AutoFixture.AutoNSubstitute" Version="4.18.1" />
<PackageReference Include="AutoFixture.Xunit2" Version="4.18.1" /> <PackageReference Include="AutoFixture.Xunit2" Version="4.18.1" />
<PackageReference Include="coverlet.collector" Version="6.0.0" /> <PackageReference Include="coverlet.collector" Version="6.0.0" />
<PackageReference Include="FluentAssertions" Version="6.12.0" /> <PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" /> <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="NSubstitute" Version="5.1.0" /> <PackageReference Include="NSubstitute" Version="5.1.0" />
<PackageReference Include="xunit" Version="2.5.3" /> <PackageReference Include="xunit" Version="2.5.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3" /> <PackageReference Include="xunit.runner.visualstudio" Version="2.5.3" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Using Include="Xunit" /> <Using Include="Xunit" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\..\src\Lumina.Presentation.Api\Lumina.Presentation.Api.csproj" /> <ProjectReference Include="..\..\..\src\Lumina.Presentation.Api\Lumina.Presentation.Api.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>