Skip to content

Commit b221e65

Browse files
author
Taner Saydam
committed
I updated .NET 10 version
1 parent e866566 commit b221e65

4 files changed

Lines changed: 14 additions & 17 deletions

File tree

GenericRepository/GenericRepository.csproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net9.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
77
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
@@ -10,11 +10,12 @@
1010
<Description>A lightweight file service for handling uploads, saving to local or FTP storage, and deleting files using IFormFile in ASP.NET Core.</Description>
1111
<PackageIcon>logo.jpg</PackageIcon>
1212
<PackageReadmeFile>README.md</PackageReadmeFile>
13+
<PackageProjectUrl>https://github.com/TS-NuGet-Packages/TS.EntityFrameworkCore.GenericRepository</PackageProjectUrl>
1314
<RepositoryUrl>https://github.com/TS-NuGet-Packages/TS.EntityFrameworkCore.GenericRepository</RepositoryUrl>
1415
<PackageId>TS.EntityFrameworkCore.GenericRepository</PackageId>
1516
<AssemblyVersion></AssemblyVersion>
1617
<FileVersion></FileVersion>
17-
<Version>9.0.4</Version>
18+
<Version>10.0.0</Version>
1819
<Authors>Taner Saydam</Authors>
1920
<PackageTags>genericrepository, efcore, entity framework core</PackageTags>
2021
<Product>Generic Repository</Product>
@@ -30,7 +31,7 @@
3031
</ItemGroup>
3132

3233
<ItemGroup>
33-
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.0" />
34+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="10.0.0" />
3435
</ItemGroup>
3536

3637
<ItemGroup>

GenericRepository/IRepository.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
using System.Linq.Expressions;
2-
using Microsoft.EntityFrameworkCore.Query;
1+
using Microsoft.EntityFrameworkCore.Query;
2+
using System.Linq.Expressions;
33

44
namespace GenericRepository;
55

@@ -38,8 +38,8 @@ public interface IRepository<TEntity>
3838
int Count(Expression<Func<TEntity, bool>> expression);
3939
Task<int> CountAsync(CancellationToken cancellationToken = default);
4040
Task<int> CountAsync(Expression<Func<TEntity, bool>> expression, CancellationToken cancellationToken = default);
41-
int ExecuteUpdate(Expression<Func<SetPropertyCalls<TEntity>, SetPropertyCalls<TEntity>>> setPropertyCalls);
42-
Task<int> ExecuteUpdateAsync(Expression<Func<SetPropertyCalls<TEntity>, SetPropertyCalls<TEntity>>> setPropertyCalls, CancellationToken cancellationToken = default);
41+
int ExecuteUpdate(Action<UpdateSettersBuilder<TEntity>> setPropertyCalls);
42+
Task<int> ExecuteUpdateAsync(Action<UpdateSettersBuilder<TEntity>> setPropertyCalls, CancellationToken cancellationToken = default);
4343
int ExecuteDelete();
4444
Task<int> ExecuteDeleteAsync(CancellationToken cancellationToken = default);
4545
}

GenericRepository/Repository.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
using System.Linq.Expressions;
2-
using Microsoft.EntityFrameworkCore;
1+
using Microsoft.EntityFrameworkCore;
32
using Microsoft.EntityFrameworkCore.Query;
3+
using System.Linq.Expressions;
44

55
namespace GenericRepository;
66

@@ -210,12 +210,12 @@ public async Task<int> CountAsync(Expression<Func<TEntity, bool>> expression, Ca
210210
return await Entity.CountAsync(expression, cancellationToken);
211211
}
212212

213-
public int ExecuteUpdate(Expression<Func<SetPropertyCalls<TEntity>, SetPropertyCalls<TEntity>>> setPropertyCalls)
213+
public int ExecuteUpdate(Action<UpdateSettersBuilder<TEntity>> setPropertyCalls)
214214
{
215215
return Entity.ExecuteUpdate(setPropertyCalls);
216216
}
217217

218-
public async Task<int> ExecuteUpdateAsync(Expression<Func<SetPropertyCalls<TEntity>, SetPropertyCalls<TEntity>>> setPropertyCalls, CancellationToken cancellationToken = default)
218+
public async Task<int> ExecuteUpdateAsync(Action<UpdateSettersBuilder<TEntity>> setPropertyCalls, CancellationToken cancellationToken = default)
219219
{
220220
return await Entity.ExecuteUpdateAsync(setPropertyCalls, cancellationToken);
221221
}

README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ This repository provides a powerful abstraction over `DbSet<T>` and supports asy
66

77
---
88

9-
# Dependency
10-
11-
This library was created by .Net 9.0
12-
139
## Installation
1410
```bash
1511
dotnet add package TS.EntityFrameworkCore.GenericRepository
@@ -116,8 +112,8 @@ public interface IRepository<TEntity>
116112
int Count(Expression<Func<TEntity, bool>> expression);
117113
Task<int> CountAsync(CancellationToken cancellationToken = default);
118114
Task<int> CountAsync(Expression<Func<TEntity, bool>> expression, CancellationToken cancellationToken = default);
119-
int ExecuteUpdate(Expression<Func<SetPropertyCalls<TEntity>, SetPropertyCalls<TEntity>>> setPropertyCalls);
120-
Task<int> ExecuteUpdateAsync(Expression<Func<SetPropertyCalls<TEntity>, SetPropertyCalls<TEntity>>> setPropertyCalls, CancellationToken cancellationToken = default);
115+
int ExecuteUpdate(Action<UpdateSettersBuilder<TEntity>> setPropertyCalls);
116+
Task<int> ExecuteUpdateAsync(Action<UpdateSettersBuilder<TEntity>> setPropertyCalls, CancellationToken cancellationToken = default);
121117
int ExecuteDelete();
122118
Task<int> ExecuteDeleteAsync(CancellationToken cancellationToken = default);
123119
}

0 commit comments

Comments
 (0)