All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Added Admin Dashboard with
AdminDashboard
using Blazor, Radzen Table and MudBlazor UI.
- Fixed
GraphQlApi
bulk mutation input parameter type and naming issues.
- Fixed build by disabling
OpenApiGenerateDocumentsOnBuild
for SourceGen projects.
- Added "GetById" method which would get item matched on
id
, whereid
could be any property name which containsId
orName
, or hasKey
Attribute.- GET
/Product{Rest|Grpc}/{id|name|anyDbKey}
- GET
- Added new
API
methods for Bulk changes ex:- POST
/Product{Rest|Grpc}/bulk
also relevantGraphQl
method - DELETE
/Product{Rest|Grpc}/bulk
also relevantGraphQl
method - PUT
/Product{Rest|Grpc}/bulk
also relevantGraphQl
method
- POST
- Added overload for
OnBeforeCreate
withIEnumerable<TDto>
which would run onbulk
method. - Added error handling in all
API
s.
- Changed
HttpGet
at/{ModelName}{Architechture}
ex:/ProductRest
method to/{ModelName}{Architechture}/bulk
.- GET
/ProductGrpc/bulk
- GET
- Changed
OnBeforeAllRead
hook toOnBeforeRead
.
- Changed Swagger UI to be included by default if
RestApi
orGrpcApi
is mapped.
- Changed storing
Model
in Db ratherDto
and setupDto
toModel
mapping and vice versa with an extension onModel
.
- Fixed
GraphQlApi
not working alone without any other Api.
- Added support for
GraphQlApi
with Hotchocolate. - Added support for Property based Attributes, which will be applied to created
Dto
for the model. ex:JsonIgnoreAttribute
- Fixed issue when Model has no constructor and default compiler generated constructor is overwritten by JsonConstructor, essentially enabling support for Models without any explicit constructors.
- Added support for
GrpcApi
with Code First protobuf-net.Grpc.
- Enabled Dependency Injection for Model.
private readonly ILogger<Product> _logger;
private readonly ILoggerFactory _loggerFactory;
public Product(ILogger<Product> logger, ILoggerFactory loggerFactory)
{
_logger = logger;
_loggerFactory = loggerFactory;
}
- The Model class is now required to be
partial
. - Changed to store DTO created based on
public
Properties from the Model rather than the Model it's self. - [Breaking Change] Replaced interface based hooks with
virtual
methods based hooks.
public virtual TDto OnBeforeCreate(TDto dto) => dto;
public virtual IEnumerable<TDto> OnBeforeAllRead(IEnumerable<TDto> dtos) => dtos;
public virtual TDto OnBeforeRead(TDto dto) => dto;
public virtual TDto OnBeforeUpdate(TDto dto) => dto;
public virtual TDto OnBeforeDelete(TDto dto) => dto;
- Changed API to return DTOs rather than the Model it's self which can be modified using Hooks.
- Added ability to hook into process before changes happen to Entity with following interfaces:
IBeforeReadHook
IBeforeCreateHook
IBeforeDeleteHook
IBeforeUpdateHook
- Upgrade to .NET 8