Releases: MarvinKlein1508/DbController
Releases · MarvinKlein1508/DbController
Release list
v5.0.0
New
- Added
Initializemethod to set one connectionstring which will be reused on initialization - Added new
DbControllerBaseclass for newInitializeandInitializeTypeAttributeCachemethods
Changed
- By default the TypeAttributeCache won't be initialized anymore. If you want to keep using this feature you'll need to call the
InitializeTypeAttributeCachemethod from the base class - Your custom controllers should now inherit from
DbControllerBase.
Removed
- Interface
IDbModelhas been removed useIDbModel<T>instead - Interface
IDbModelWithNamehas been removed useIDbModelWithName<T>instead - Interface
ILocalizedDbModelhas been removed useILocalizedDbModel<T>instead
Full Changelog: v4.1.0...v5.0.0
v4.1.0
##What's changed
- Added
IDbModel<TIdentifier> - Deprecated
IDbModel - Deprecated
IDbModelWithName - Deprecated
ILocalizedDbModel
Full Changelog: v4.0.0...v4.1.0
v4.0.0
What's changed?
- Added ExecuteReaderAsync method to
IDbControllerinterface which allows the user to process each row individually - Added FbController for Firebird
- Updated NuGet packages to latest version
Full Changelog: v3.6.0...v4.0.0
3.6.0
v3.4.0
What's changed?
- Updated
Dapperdependency to v2.1.28 - Replaced
MySql.Datadependency withMySqlConnectordependency
Full Changelog: v3.3.0...v3.4.0
v3.3.0
Whats changed?
- Added ExecuteProcedureAsync method to
IDbControllerinterface
v3.2.0
What's changed?
- Added interfaces ICreateOperation, IUpdateOperation, IDeleteOperation & IGetOperation
- Updated Dapper to v2.1.24
- Upgraded to .NET 8
- Removed
TypeAttributeCache.CacheIsInitializedto prevent issues within ASP.NET Core apps during publishing
Full Changelog: v3.1.0...v3.2.0
v3.1.0
What's changed?
DbController
- Updated to Dapper 2.1.15
DbController.MySql
- Updated to MySql.Data 8.2.0
DbController.SqlServer
- Updated to Microsoft.Data.SqlClient 5.1.2
DbController.TypeHandler
- Updated to Dapper 2.1.15
- Added new JsonTypeHandler
Full Changelog: v3.0.0...v3.1.0
v3.0.0
Whats new?
- Updated Dapper to v2.1.4
- DbController.SqlController now uses
Microsoft.Data.SqlClientinstead ofSystem.Data.SqlClient - Added try catch for
SingletonTypeAttributeCache.CacheAllto prevent a crash when the types of an assembly could not be loaded via reflection
v2.6.0
Whats new?
- Added static field
TypeAttributeCache.CacheIsInitializedwhich is being used to check if theTypeAttributeCachehas already been initialized. This comes in handy when you'll need two differentIDbControllerimplementations within the same project. In addition it allows to manually setup the cache during application startup.
Breaking changes
The default static constructor implementation has been changed a little bit. The static constructor should now only initialize the TypeAttributeCache when this property is set to false.
You can update your static constructors to this code for example:
/// <summary>
/// Static constructor to initialize the TypeAttributeCache
/// </summary>
static MySqlController()
{
if (!TypeAttributeCache.CacheIsInitialized)
{
// INIT Dapper for CompareField
foreach (Type type in SingletonTypeAttributeCache.CacheAll<CompareFieldAttribute>((att) => att.FieldNames))
{
SqlMapper.SetTypeMap(type, new CustomPropertyTypeMap(
type,
(type, columnName) =>
{
PropertyInfo? prop = SingletonTypeAttributeCache.Get(type, columnName);
return prop is null ? type.GetProperty(columnName, BindingFlags.IgnoreCase | BindingFlags.Public | BindingFlags.Instance) : prop;
}
));
}
TypeAttributeCache.CacheIsInitialized = true;
}
}