File tree 2 files changed +2
-11
lines changed
LinkDotNet.Blog.Infrastructure/Persistence/Sql
LinkDotNet.Blog.Web/Controller
2 files changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -69,16 +69,7 @@ public async ValueTask StoreAsync(TEntity entity)
69
69
}
70
70
else
71
71
{
72
- var dbEntity = blogDbContext . Set < TEntity > ( ) . Local . FirstOrDefault ( e => e . Id == entity . Id ) ;
73
- if ( dbEntity != null )
74
- {
75
- blogDbContext . Entry ( dbEntity ) . CurrentValues . SetValues ( entity ) ;
76
- blogDbContext . Entry ( dbEntity ) . State = EntityState . Modified ;
77
- }
78
- else
79
- {
80
- blogDbContext . Entry ( entity ) . State = EntityState . Modified ;
81
- }
72
+ blogDbContext . Entry ( entity ) . State = EntityState . Modified ;
82
73
}
83
74
84
75
await blogDbContext . SaveChangesAsync ( ) ;
Original file line number Diff line number Diff line change @@ -107,5 +107,5 @@ private sealed record BlogPostRssInfo(
107
107
string ShortDescription ,
108
108
DateTime UpdatedDate ,
109
109
string PreviewImageUrl ,
110
- ICollection < string > Tags ) ;
110
+ IReadOnlyCollection < string > Tags ) ;
111
111
}
You can’t perform that action at this time.
0 commit comments