Skip to content
This repository has been archived by the owner on Dec 29, 2020. It is now read-only.

Releases: MicroLite-ORM/MicroLite

MicroLite 7.0.0

27 Mar 10:19
8b89888
Compare
Choose a tag to compare

MicroLite 7.0.0 contains a number of changes over 6.3.4:

  • The library is now .NET 4.5 only, the .NET 3.5, 4.0 and 4.6 builds have been removed
  • The library is now using the .NET Standard project format, tests are now .NET 4.8 and xUnit 2.4.1
  • Build is migrated to Azure DevOps YAML
  • Code style updated using .editorconfig and enforced via StyleCop
  • C# 7.3 language features (Expression bodied members, Pattern Matching, Throw expressions etc.)
  • Added SecurityCodeScan and SonarAnalyzer.CSharp Roslyn analyzer packages to ensure code quality
  • Breaking Change The API is now Async only, the IAsync..Session interfaces are removed and the I...Session interfaces now only contain the async methods
  • Breaking Change SqlServer CE support removed

The following issues have been resolved:

  • #484 - Select builder adds extra parenthesis

Upgrade Scenarios

Using .NET 3.5 or 4.0

Remain on MicroLite 6.3.4 until you can migrate to .NET 4.5 or later.

Using SQL Server Compact Edition

Remain on MicroLite 6.3.4 until you can migrate to an alternative database (e.g. SQLite).

Using .NET 4.5 or later and not currently using Async sessions

  • Update to MicroLite 7.0
  • Update to use async versions of ISession/IReadOnlySession interfaces
  • e.g. var customer = session.Single(123); => var customer = await session.SingleAsync(123);

Using .NET 4.5 or later and already using Async sessions

  • Update to MicroLite 7.0, find and replace:
    • IAsyncSession with ISession
    • IAsyncReadOnlySession with IReadOnlySession
    • IAdvancedAsyncSession with IAdvancedSession
    • IAdvancedAsyncReadOnlySession with IAdvancedReadOnlySession
    • OpenAsyncSession() with OpenSession()
    • OpenAsyncReadOnlySession() with OpenReadOnlySession()

The following API changes exist MicroLite 6.3.4 to 7.0.0

MicroLite

- public interface IAdvancedAsyncReadOnlySession
- public interface IAdvancedAsyncSession
- public interface IAsyncReadOnlySession
- public interface IAsyncSession
- public interface IHideObjectMethods

IAdvancedReadOnlySession

- void ExecutePendingQueries();
+ Task ExecutePendingQueriesAsync();
+ Task ExecutePendingQueriesAsync(CancellationToken cancellationToken);

IAdvancedSession

- bool Delete(Type type, object identifier);
- T ExecuteScalar<T>(SqlQuery sqlQuery);
- bool Update(ObjectDelta objectDelta);
+ Task<bool> DeleteAsync(Type type, object identifier);
+ Task<bool> DeleteAsync(Type type, object identifier, CancellationToken cancellationToken);
+ Task<int> ExecuteAsync(SqlQuery sqlQuery);
+ Task<int> ExecuteAsync(SqlQuery sqlQuery, CancellationToken cancellationToken);
+ Task<T> ExecuteScalarAsync<T>(SqlQuery sqlQuery);
+ Task<T> ExecuteScalarAsync<T>(SqlQuery sqlQuery, CancellationToken cancellationToken);
+ Task<bool> UpdateAsync(ObjectDelta objectDelta);
+ Task<bool> UpdateAsync(ObjectDelta objectDelta, CancellationToken cancellationToken);

IReadOnlySession

- IList<T> Fetch<T>(SqlQuery sqlQuery);
- PagedResult<T> Paged<T>(SqlQuery sqlQuery, PagingOptions pagingOptions);
- T Single<T>(object identifier) where T : class, new();
- T Single<T>(SqlQuery sqlQuery);
+ Task<IList<T>> FetchAsync<T>(SqlQuery sqlQuery);
+ Task<IList<T>> FetchAsync<T>(SqlQuery sqlQuery, CancellationToken cancellationToken);
+ Task<PagedResult<T>> PagedAsync<T>(SqlQuery sqlQuery, PagingOptions pagingOptions);
+ Task<PagedResult<T>> PagedAsync<T>(SqlQuery sqlQuery, PagingOptions pagingOptions, CancellationToken cancellationToken);
+ Task<T> SingleAsync<T>(object identifier) where T : class, new();
+ Task<T> SingleAsync<T>(object identifier, CancellationToken cancellationToken) where T : class, new();
+ Task<T> SingleAsync<T>(SqlQuery sqlQuery);
+ Task<T> SingleAsync<T>(SqlQuery sqlQuery, CancellationToken cancellationToken);

ISession

- bool Delete(object instance);
- void Insert(object instance);
- bool Update(object instance);
+ Task<bool> DeleteAsync(object instance);
+ Task<bool> DeleteAsync(object instance, CancellationToken cancellationToken);
+ Task InsertAsync(object instance);
+ Task InsertAsync(object instance, CancellationToken cancellationToken);
+ Task<bool> UpdateAsync(object instance);
+ Task<bool> UpdateAsync(object instance, CancellationToken cancellationToken);

ISessionFactory

- IAsyncReadOnlySession OpenAsyncReadOnlySession();
- IAsyncReadOnlySession OpenAsyncReadOnlySession(ConnectionScope connectionScope);
- IAsyncSession OpenAsyncSession();
- IAsyncSession OpenAsyncSession(ConnectionScope connectionScope);

Configuration

ConfigurationExtensions

- public static ICreateSessionFactory ForSqlServerCeConnection(this IConfigureConnection configureConnection, string connectionName)
- public static ICreateSessionFactory ForSqlServerCeConnection(this IConfigureConnection configureConnection, string connectionName, string connectionString, string providerName)

Infrastructure

- public interface IHaveAsyncReadOnlySession
- public interface IHaveAsyncSession

IHaveReadOnlySession

- IReadOnlySession Session { get; set; }
+ IReadOnlySession Session { get; }

IHaveSession

- ISession Session { get; set; }
+ ISession Session { get; }

view code changes

MicroLite 6.3.4

22 Nov 14:56
Compare
Choose a tag to compare

MicroLite 6.3.4 contains a single change:

  • #473 - TypeConverter.ResolveDbType doesnt support Nullable enum, but EnumTypeConverter does

view code changes

MicroLite 6.3.3

06 Jul 20:49
Compare
Choose a tag to compare

MicroLite 6.3.3 contains a single change:

  • #443 - Incorrect parameter numbers when using SqlUtility.RenumberParameters

view code changes

MicroLite 6.3.2

17 Sep 18:35
Compare
Choose a tag to compare

MicroLite 6.3.2 contains a single change:

  • #455 - Whole Process crashes with AccessViolationException when assigning a non-null value to a nullable Property while using ITypeConverter

view code changes

MicroLite 6.3.1

04 Sep 10:48
Compare
Choose a tag to compare

MicroLite 6.3.1 contains a single change:

  • #454 - IdentifierStrategyListener is not registered by default

This meant that the identifier for a newly inserted record wasn't set on the inserted object.

view code changes

MicroLite 6.3.0

30 Aug 07:48
Compare
Choose a tag to compare

MicroLite 6.2.9 contains the following changes:

  • #422 - Add some helper convention mappings
  • #447 - Use DbType.DateTime2 as the default mapping for System.DateTime
  • #449 - Simplify the listener code
  • #450 - Setting DbType via Column Attribute results in a compilation error
  • #452 - Use DbType.Xml for XDocument

For further information, see the Upgrading to MicroLite 6.3 Blog Post

view code changes

MicroLite 6.2.9

22 Mar 19:49
Compare
Choose a tag to compare

MicroLite 6.2.9 contains a couple of changes:

  • #442 - Query with large number of parameters errors when run as an include
  • #443 - Incorrect parameter numbers when using SqlUtility.RenumberParameters

view code changes

MicroLite 6.2.8

08 Dec 19:40
Compare
Choose a tag to compare

MicroLite 6.2.8 contains a couple of changes:

  • Improved validation of ObjectInfo.SetIdentifierValue
  • Corrected resolution of table name from a generic class
  • #432 - When using dynamic paged results, the row number used for paging shouldn't be returned

This release was supposed to be MicroLite 6.2.7, but I found a missing change for #432 which resulted in an exception

view code changes

MicroLite 6.2.6

05 Nov 18:53
Compare
Choose a tag to compare

MicroLite 6.2.6 contains a couple of improvements to the English Inflection Service which is used by the convention based mapping to pluralise class names (e.g. Customer -> Customers).

The changes are mostly around words with an F in (e.g. Refund was being turned into Revesund instead of Refunds).

view code changes

MicroLite 6.2.5

27 Sep 21:20
Compare
Choose a tag to compare

MicroLite 6.2.5 contains 1 bug fix:

  • Issue #410 - TypeConverter.ResolveActualType returns null

view code changes