Skip to content

Commit f5fe145

Browse files
committed
Upgraded to ABP 0.5.
1 parent 16a31eb commit f5fe145

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+934
-740
lines changed

Templates/All-In-One-Template/MySpaProject/MySpaProject.Application/MySpaProject.Application.csproj

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,13 @@
3232
<WarningLevel>4</WarningLevel>
3333
</PropertyGroup>
3434
<ItemGroup>
35-
<Reference Include="Abp, Version=0.4.4.2, Culture=neutral, processorArchitecture=MSIL">
35+
<Reference Include="Abp, Version=0.5.0.0, Culture=neutral, processorArchitecture=MSIL">
3636
<SpecificVersion>False</SpecificVersion>
37-
<HintPath>..\packages\Abp.0.4.4.2\lib\net451\Abp.dll</HintPath>
37+
<HintPath>..\packages\Abp.0.5.0.0\lib\net451\Abp.dll</HintPath>
3838
</Reference>
39-
<Reference Include="Abp.AutoMapper">
40-
<HintPath>..\packages\Abp.AutoMapper.0.4.4.0\lib\net451\Abp.AutoMapper.dll</HintPath>
39+
<Reference Include="Abp.AutoMapper, Version=0.5.0.0, Culture=neutral, processorArchitecture=MSIL">
40+
<SpecificVersion>False</SpecificVersion>
41+
<HintPath>..\packages\Abp.AutoMapper.0.5.0.0\lib\net451\Abp.AutoMapper.dll</HintPath>
4142
</Reference>
4243
<Reference Include="AutoMapper, Version=3.3.0.0, Culture=neutral, PublicKeyToken=be96cd2c38ef1005, processorArchitecture=MSIL">
4344
<SpecificVersion>False</SpecificVersion>

Templates/All-In-One-Template/MySpaProject/MySpaProject.Application/packages.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Abp" version="0.4.4.2" targetFramework="net451" />
4-
<package id="Abp.AutoMapper" version="0.4.4.0" targetFramework="net451" />
3+
<package id="Abp" version="0.5.0.0" targetFramework="net451" />
4+
<package id="Abp.AutoMapper" version="0.5.0.0" targetFramework="net451" />
55
<package id="AutoMapper" version="3.3.0" targetFramework="net451" />
66
<package id="Castle.Core" version="3.3.3" targetFramework="net451" />
77
<package id="Castle.LoggingFacility" version="3.3.0" targetFramework="net451" />

Templates/All-In-One-Template/MySpaProject/MySpaProject.Core/MySpaProject.Core.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232
<WarningLevel>4</WarningLevel>
3333
</PropertyGroup>
3434
<ItemGroup>
35-
<Reference Include="Abp, Version=0.4.4.2, Culture=neutral, processorArchitecture=MSIL">
35+
<Reference Include="Abp, Version=0.5.0.0, Culture=neutral, processorArchitecture=MSIL">
3636
<SpecificVersion>False</SpecificVersion>
37-
<HintPath>..\packages\Abp.0.4.4.2\lib\net451\Abp.dll</HintPath>
37+
<HintPath>..\packages\Abp.0.5.0.0\lib\net451\Abp.dll</HintPath>
3838
</Reference>
3939
<Reference Include="Castle.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
4040
<SpecificVersion>False</SpecificVersion>

Templates/All-In-One-Template/MySpaProject/MySpaProject.Core/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Abp" version="0.4.4.2" targetFramework="net451" />
3+
<package id="Abp" version="0.5.0.0" targetFramework="net451" />
44
<package id="Castle.Core" version="3.3.3" targetFramework="net451" />
55
<package id="Castle.LoggingFacility" version="3.3.0" targetFramework="net451" />
66
<package id="Castle.Windsor" version="3.3.0" targetFramework="net451" />

Templates/All-In-One-Template/MySpaProject/MySpaProject.EntityFramework/EntityFramework/MySpaProjectDbContext.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,4 @@ public MySpaProjectDbContext(string nameOrConnectionString)
3030

3131
}
3232
}
33-
34-
//Example:
35-
//public class User : Entity
36-
//{
37-
// public string Name { get; set; }
38-
39-
// public string Password { get; set; }
40-
//}
4133
}
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,30 @@
11
using Abp.Domain.Entities;
2+
using Abp.EntityFramework;
23
using Abp.EntityFramework.Repositories;
34

45
namespace MySpaProject.EntityFramework.Repositories
56
{
67
public abstract class MySpaProjectRepositoryBase<TEntity, TPrimaryKey> : EfRepositoryBase<MySpaProjectDbContext, TEntity, TPrimaryKey>
78
where TEntity : class, IEntity<TPrimaryKey>
89
{
10+
protected MySpaProjectRepositoryBase(IDbContextProvider<MySpaProjectDbContext> dbContextProvider)
11+
: base(dbContextProvider)
12+
{
13+
14+
}
15+
16+
//add common methods for all repositories
917
}
1018

1119
public abstract class MySpaProjectRepositoryBase<TEntity> : MySpaProjectRepositoryBase<TEntity, int>
1220
where TEntity : class, IEntity<int>
1321
{
22+
protected MySpaProjectRepositoryBase(IDbContextProvider<MySpaProjectDbContext> dbContextProvider)
23+
: base(dbContextProvider)
24+
{
25+
26+
}
1427

28+
//do not add any method here, add to the class above (since this inherits it)
1529
}
1630
}

Templates/All-In-One-Template/MySpaProject/MySpaProject.EntityFramework/MySpaProject.EntityFramework.csproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@
3232
<WarningLevel>4</WarningLevel>
3333
</PropertyGroup>
3434
<ItemGroup>
35-
<Reference Include="Abp, Version=0.4.4.2, Culture=neutral, processorArchitecture=MSIL">
35+
<Reference Include="Abp, Version=0.5.0.0, Culture=neutral, processorArchitecture=MSIL">
3636
<SpecificVersion>False</SpecificVersion>
37-
<HintPath>..\packages\Abp.0.4.4.2\lib\net451\Abp.dll</HintPath>
37+
<HintPath>..\packages\Abp.0.5.0.0\lib\net451\Abp.dll</HintPath>
3838
</Reference>
39-
<Reference Include="Abp.EntityFramework, Version=0.4.4.0, Culture=neutral, processorArchitecture=MSIL">
39+
<Reference Include="Abp.EntityFramework, Version=0.5.0.0, Culture=neutral, processorArchitecture=MSIL">
4040
<SpecificVersion>False</SpecificVersion>
41-
<HintPath>..\packages\Abp.EntityFramework.0.4.4.0\lib\net451\Abp.EntityFramework.dll</HintPath>
41+
<HintPath>..\packages\Abp.EntityFramework.0.5.0.0\lib\net451\Abp.EntityFramework.dll</HintPath>
4242
</Reference>
4343
<Reference Include="Castle.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
4444
<SpecificVersion>False</SpecificVersion>
@@ -54,11 +54,11 @@
5454
</Reference>
5555
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
5656
<SpecificVersion>False</SpecificVersion>
57-
<HintPath>..\packages\EntityFramework.6.1.1\lib\net45\EntityFramework.dll</HintPath>
57+
<HintPath>..\packages\EntityFramework.6.1.2\lib\net45\EntityFramework.dll</HintPath>
5858
</Reference>
5959
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
6060
<SpecificVersion>False</SpecificVersion>
61-
<HintPath>..\packages\EntityFramework.6.1.1\lib\net45\EntityFramework.SqlServer.dll</HintPath>
61+
<HintPath>..\packages\EntityFramework.6.1.2\lib\net45\EntityFramework.SqlServer.dll</HintPath>
6262
</Reference>
6363
<Reference Include="System" />
6464
<Reference Include="System.Collections.Immutable, Version=1.0.34.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Abp" version="0.4.4.2" targetFramework="net451" />
4-
<package id="Abp.EntityFramework" version="0.4.4.0" targetFramework="net451" />
3+
<package id="Abp" version="0.5.0.0" targetFramework="net451" />
4+
<package id="Abp.EntityFramework" version="0.5.0.0" targetFramework="net451" />
55
<package id="Castle.Core" version="3.3.3" targetFramework="net451" />
66
<package id="Castle.LoggingFacility" version="3.3.0" targetFramework="net451" />
77
<package id="Castle.Windsor" version="3.3.0" targetFramework="net451" />
8-
<package id="EntityFramework" version="6.1.1" targetFramework="net451" />
8+
<package id="EntityFramework" version="6.1.2" targetFramework="net451" />
99
<package id="Microsoft.Bcl.Immutable" version="1.0.34" targetFramework="net451" />
1010
</packages>

Templates/All-In-One-Template/MySpaProject/MySpaProject.NHibernate/MySpaProject.NHibernate.csproj

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,17 @@
3232
<WarningLevel>4</WarningLevel>
3333
</PropertyGroup>
3434
<ItemGroup>
35-
<Reference Include="Abp, Version=0.4.4.2, Culture=neutral, processorArchitecture=MSIL">
35+
<Reference Include="Abp, Version=0.5.0.0, Culture=neutral, processorArchitecture=MSIL">
3636
<SpecificVersion>False</SpecificVersion>
37-
<HintPath>..\packages\Abp.0.4.4.2\lib\net451\Abp.dll</HintPath>
37+
<HintPath>..\packages\Abp.0.5.0.0\lib\net451\Abp.dll</HintPath>
3838
</Reference>
39-
<Reference Include="Abp.FluentMigrator, Version=0.4.4.0, Culture=neutral, processorArchitecture=MSIL">
39+
<Reference Include="Abp.FluentMigrator, Version=0.5.0.0, Culture=neutral, processorArchitecture=MSIL">
4040
<SpecificVersion>False</SpecificVersion>
41-
<HintPath>..\packages\Abp.FluentMigrator.0.4.4.0\lib\net451\Abp.FluentMigrator.dll</HintPath>
41+
<HintPath>..\packages\Abp.FluentMigrator.0.5.0.0\lib\net451\Abp.FluentMigrator.dll</HintPath>
4242
</Reference>
43-
<Reference Include="Abp.NHibernate, Version=0.4.4.0, Culture=neutral, processorArchitecture=MSIL">
43+
<Reference Include="Abp.NHibernate, Version=0.5.0.0, Culture=neutral, processorArchitecture=MSIL">
4444
<SpecificVersion>False</SpecificVersion>
45-
<HintPath>..\packages\Abp.NHibernate.0.4.4.0\lib\net451\Abp.NHibernate.dll</HintPath>
45+
<HintPath>..\packages\Abp.NHibernate.0.5.0.0\lib\net451\Abp.NHibernate.dll</HintPath>
4646
</Reference>
4747
<Reference Include="Castle.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
4848
<SpecificVersion>False</SpecificVersion>
@@ -60,9 +60,9 @@
6060
<SpecificVersion>False</SpecificVersion>
6161
<HintPath>..\packages\FluentMigrator.1.3.1.0\lib\40\FluentMigrator.dll</HintPath>
6262
</Reference>
63-
<Reference Include="FluentNHibernate, Version=1.4.0.0, Culture=neutral, PublicKeyToken=8aa435e3cb308880, processorArchitecture=MSIL">
63+
<Reference Include="FluentNHibernate, Version=2.0.1.0, Culture=neutral, processorArchitecture=MSIL">
6464
<SpecificVersion>False</SpecificVersion>
65-
<HintPath>..\packages\FluentNHibernate.1.4.0.0\lib\net35\FluentNHibernate.dll</HintPath>
65+
<HintPath>..\packages\FluentNHibernate.2.0.1.0\lib\net40\FluentNHibernate.dll</HintPath>
6666
</Reference>
6767
<Reference Include="Iesi.Collections, Version=4.0.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">
6868
<SpecificVersion>False</SpecificVersion>
@@ -88,6 +88,7 @@
8888
<ItemGroup>
8989
<Compile Include="DbMigrations\VersionTable.cs" />
9090
<Compile Include="MySpaProjectDataModule.cs" />
91+
<Compile Include="NHibernate\Repositories\MySpaProjectRepositoryBase.cs" />
9192
<Compile Include="Properties\AssemblyInfo.cs" />
9293
</ItemGroup>
9394
<ItemGroup>
@@ -103,7 +104,6 @@
103104
</ItemGroup>
104105
<ItemGroup>
105106
<Folder Include="NHibernate\EntityMappings\" />
106-
<Folder Include="NHibernate\Repositories\" />
107107
</ItemGroup>
108108
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
109109
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
using Abp.Domain.Entities;
2+
using Abp.NHibernate;
3+
using Abp.NHibernate.Repositories;
4+
5+
namespace MySpaProject.NHibernate.Repositories
6+
{
7+
/// <summary>
8+
/// Base class for all repositories in this application
9+
/// </summary>
10+
/// <typeparam name="TEntity">Entity type</typeparam>
11+
/// <typeparam name="TPrimaryKey">Type of the primary key</typeparam>
12+
public abstract class MySpaProjectRepositoryBase<TEntity, TPrimaryKey> : NhRepositoryBase<TEntity, TPrimaryKey>
13+
where TEntity : class, IEntity<TPrimaryKey>
14+
{
15+
protected MySpaProjectRepositoryBase(ISessionProvider sessionProvider) : base(sessionProvider)
16+
{
17+
}
18+
19+
//add common methods for all repositories
20+
}
21+
22+
/// <summary>
23+
/// A shortcut of MySpaProjectRepositoryBase for entities with integer Id.
24+
/// </summary>
25+
/// <typeparam name="TEntity">Entity type</typeparam>
26+
public abstract class MySpaProjectRepositoryBase<TEntity> : MySpaProjectRepositoryBase<TEntity, int>
27+
where TEntity : class, IEntity<int>
28+
{
29+
protected MySpaProjectRepositoryBase(ISessionProvider sessionProvider) : base(sessionProvider)
30+
{
31+
}
32+
33+
//do not add any method here, add to the class above (since this inherits it)
34+
}
35+
}

0 commit comments

Comments
 (0)