File tree Expand file tree Collapse file tree 4 files changed +21
-2
lines changed
Expand file tree Collapse file tree 4 files changed +21
-2
lines changed Original file line number Diff line number Diff line change 11### CsuChhs.DataTools
22
3+ ### 1.0.4
4+ - Added Temporal query support
5+
36#### 1.0.3
47- Added bulk insert action that removes save changes.
58
Original file line number Diff line number Diff line change 66 <Nullable >enable</Nullable >
77 <GeneratePackageOnBuild >true</GeneratePackageOnBuild >
88 <Authors >CHHS Application Development Team</Authors >
9- <Version >1.0.3 </Version >
9+ <Version >1.0.4 </Version >
1010 <PackageProjectUrl >https://github.com/csu-chhs/CsuChhs.DataTools</PackageProjectUrl >
1111 <Company >College of Health and Human Sciences</Company >
1212 <PackageId >CsuChhs.DataTools</PackageId >
1616 <PackageReadmeFile >README.md</PackageReadmeFile >
1717 </PropertyGroup >
1818 <ItemGroup >
19- <PackageReference Include =" Microsoft.EntityFrameworkCore" Version =" 9.*" />
19+ <PackageReference Include =" Microsoft.EntityFrameworkCore" Version =" 9.0.5" />
20+ <PackageReference Include =" Microsoft.EntityFrameworkCore.SqlServer" Version =" 9.0.5" />
2021 <None Include =" ../README.md" Pack =" true" PackagePath =" \" />
2122 </ItemGroup >
2223
Original file line number Diff line number Diff line change @@ -31,6 +31,19 @@ public IQueryable<T> AllQueryable()
3131 return _dbContext . Set < T > ( ) ;
3232 }
3333
34+ public IQueryable < T > TemporalAll ( )
35+ {
36+ return _dbContext . Set < T > ( ) . TemporalAll ( ) ;
37+ }
38+
39+ public IQueryable < T > TemporalAllOrdered ( )
40+ {
41+ return _dbContext
42+ . Set < T > ( )
43+ . TemporalAll ( )
44+ . OrderBy ( s => EF . Property < DateTime > ( s , "ValidFrom" ) ) ;
45+ }
46+
3447 public void Delete ( T entity )
3548 {
3649 _dbContext . Set < T > ( ) . Remove ( entity ) ;
Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ namespace CsuChhs.DataTools.Interfaces
55 public interface IRepository < T > where T : BaseModel
66 {
77 IQueryable < T > AllQueryable ( ) ;
8+ IQueryable < T > TemporalAll ( ) ;
9+ IQueryable < T > TemporalAllOrdered ( ) ;
810 void Update ( T entity ) ;
911 void Delete ( T entity ) ;
1012 T Add ( T entity ) ;
You can’t perform that action at this time.
0 commit comments