-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨feat: Added composite Replace method
- Loading branch information
1 parent
7a0b883
commit 935d44d
Showing
5 changed files
with
86 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using Simpleverse.Repository.Operations; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Data; | ||
using System.Threading.Tasks; | ||
|
||
namespace Simpleverse.Repository.Db.Operations | ||
{ | ||
public interface IReplaceDb<TModel, TFilter> : IReplace<TModel, TFilter> | ||
where TModel : class | ||
where TFilter : IQueryFilter, new() | ||
{ | ||
Task<(int Deleted, int Added)> Replace( | ||
IDbConnection conn, | ||
IDbTransaction tran, | ||
Action<TFilter> filterSetup, | ||
IEnumerable<TModel> models | ||
); | ||
} | ||
} |
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,16 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Threading.Tasks; | ||
|
||
namespace Simpleverse.Repository.Operations | ||
{ | ||
public interface IReplace<TModel, TFilter> | ||
where TModel : class | ||
where TFilter : IQueryFilter, new() | ||
{ | ||
Task<(int Deleted, int Added)> Replace( | ||
Action<TFilter> filterSetup, | ||
IEnumerable<TModel> models | ||
); | ||
} | ||
} |
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