Skip to content

Releases: MarvinKlein1508/DbController

v5.0.0

Choose a tag to compare

@MarvinKlein1508 MarvinKlein1508 released this 14 Nov 11:09

New

  • Added Initialize method to set one connectionstring which will be reused on initialization
  • Added new DbControllerBase class for new Initialize and InitializeTypeAttributeCache methods

Changed

  • By default the TypeAttributeCache won't be initialized anymore. If you want to keep using this feature you'll need to call the InitializeTypeAttributeCache method from the base class
  • Your custom controllers should now inherit from DbControllerBase.

Removed

  • Interface IDbModel has been removed use IDbModel<T> instead
  • Interface IDbModelWithName has been removed use IDbModelWithName<T> instead
  • Interface ILocalizedDbModel has been removed use ILocalizedDbModel<T> instead

Full Changelog: v4.1.0...v5.0.0

v4.1.0

Choose a tag to compare

@MarvinKlein1508 MarvinKlein1508 released this 25 Apr 11:21

##What's changed

  • Added IDbModel<TIdentifier>
  • Deprecated IDbModel
  • Deprecated IDbModelWithName
  • Deprecated ILocalizedDbModel

Full Changelog: v4.0.0...v4.1.0

v4.0.0

Choose a tag to compare

@MarvinKlein1508 MarvinKlein1508 released this 09 Apr 10:48

What's changed?

  • Added ExecuteReaderAsync method to IDbController interface 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

Choose a tag to compare

@MarvinKlein1508 MarvinKlein1508 released this 08 Mar 11:12
v3.6.0

NuGet Update

v3.4.0

Choose a tag to compare

@MarvinKlein1508 MarvinKlein1508 released this 03 Jan 12:19

What's changed?

  • Updated Dapper dependency to v2.1.28
  • Replaced MySql.Data dependency with MySqlConnector dependency

Full Changelog: v3.3.0...v3.4.0

v3.3.0

Choose a tag to compare

@MarvinKlein1508 MarvinKlein1508 released this 07 Dec 16:23

Whats changed?

  • Added ExecuteProcedureAsync method to IDbController interface

v3.2.0

Choose a tag to compare

@MarvinKlein1508 MarvinKlein1508 released this 29 Nov 08:10

What's changed?

  • Added interfaces ICreateOperation, IUpdateOperation, IDeleteOperation & IGetOperation
  • Updated Dapper to v2.1.24
  • Upgraded to .NET 8
  • Removed TypeAttributeCache.CacheIsInitialized to prevent issues within ASP.NET Core apps during publishing

Full Changelog: v3.1.0...v3.2.0

v3.1.0

Choose a tag to compare

@MarvinKlein1508 MarvinKlein1508 released this 08 Nov 10:15

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

Choose a tag to compare

@MarvinKlein1508 MarvinKlein1508 released this 12 Oct 10:48

Whats new?

  • Updated Dapper to v2.1.4
  • DbController.SqlController now uses Microsoft.Data.SqlClient instead of System.Data.SqlClient
  • Added try catch for SingletonTypeAttributeCache.CacheAll to prevent a crash when the types of an assembly could not be loaded via reflection

v2.6.0

Choose a tag to compare

@MarvinKlein1508 MarvinKlein1508 released this 21 Sep 13:01

Whats new?

  • Added static field TypeAttributeCache.CacheIsInitialized which is being used to check if the TypeAttributeCache has already been initialized. This comes in handy when you'll need two different IDbController implementations 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;
    }
}