This repository has been archived by the owner on May 7, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from osoykan/dev
dev to master
- Loading branch information
Showing
96 changed files
with
2,368 additions
and
430 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,19 @@ | ||
using Stove.Dapper.Dapper.Repositories; | ||
using Stove.Domain.Repositories; | ||
using Stove.EntityFramework.EntityFramework; | ||
|
||
namespace Stove.Dapper.Dapper | ||
{ | ||
public static class DapperAutoRepositoryTypes | ||
{ | ||
static DapperAutoRepositoryTypes() | ||
{ | ||
Default = new AutoRepositoryTypesAttribute( | ||
Default = new DapperAutoRepositoryTypeAttribute( | ||
typeof(IDapperRepository<>), | ||
typeof(IDapperRepository<,>), | ||
typeof(DapperRepositoryBase<,>), | ||
typeof(DapperRepositoryBase<,,>) | ||
); | ||
} | ||
|
||
public static AutoRepositoryTypesAttribute Default { get; private set; } | ||
public static DapperAutoRepositoryTypeAttribute Default { get; private set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Linq.Expressions; | ||
using System.Reflection; | ||
|
||
using DapperExtensions; | ||
|
||
using JetBrains.Annotations; | ||
|
||
namespace Stove.Dapper.Dapper.Extensions | ||
{ | ||
internal static class SortingExtensions | ||
{ | ||
[NotNull] | ||
public static List<ISort> ToSortable<T>([NotNull] this Expression<Func<T, object>>[] sortingExpression, bool ascending = true) | ||
{ | ||
Check.NotNullOrEmpty(sortingExpression, nameof(sortingExpression)); | ||
|
||
var sortList = new List<ISort>(); | ||
sortingExpression.ToList().ForEach(sortExpression => | ||
{ | ||
MemberInfo sortProperty = ReflectionHelper.GetProperty(sortExpression); | ||
sortList.Add(new Sort { Ascending = ascending, PropertyName = sortProperty.Name }); | ||
}); | ||
|
||
return sortList; | ||
} | ||
} | ||
} |
1 change: 0 additions & 1 deletion
1
src/Stove.Dapper/Dapper/Repositories/DapperRepositoryBaseOfTEntity.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...epositories/IDapperRepositoryOfTEntity.cs → ...epositories/IDapperRepositoryOfTEntity.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.