Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove sync method from IQueryHandler in .NET Core to eliminate confusion when implementing the interface #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/CoreDdd.Nhibernate/Queries/BaseNhibernateQueryHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ protected BaseNhibernateQueryHandler(NhibernateUnitOfWork unitOfWork)
Session = unitOfWork.Session;
}

#if NET40
/// <summary>
/// Executes the query.
/// </summary>
Expand All @@ -43,6 +44,7 @@ public virtual IEnumerable<TResult> Execute<TResult>(TQuery query)
{
return Enumerable.Empty<TResult>();
}
#endif

#if !NET40
#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously
Expand Down
2 changes: 2 additions & 0 deletions src/CoreDdd/Queries/IQueryHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ namespace CoreDdd.Queries
public interface IQueryHandler<in TQuery>
where TQuery : IQuery
{
#if NET40
/// <summary>
/// Executes a query handling logic for a given query.
/// </summary>
/// <typeparam name="TResult">A query result type</typeparam>
/// <param name="query">An instance of a query with a data</param>
/// <returns>A collection of query results</returns>
IEnumerable<TResult> Execute<TResult>(TQuery query);
#endif

#if !NET40
/// <summary>
Expand Down