File tree Expand file tree Collapse file tree 3 files changed +7
-11
lines changed
SimpleTaskSystem.EntityFramework
SimpleTaskSystem.NHibernate Expand file tree Collapse file tree 3 files changed +7
-11
lines changed Original file line number Diff line number Diff line change 1
1
using System . Reflection ;
2
+ using Abp . EntityFramework ;
2
3
using Abp . Modules ;
3
4
4
5
namespace SimpleTaskSystem
5
6
{
6
- [ DependsOn ( typeof ( SimpleTaskSystemCoreModule ) ) ]
7
+ [ DependsOn ( typeof ( SimpleTaskSystemCoreModule ) , typeof ( AbpEntityFrameworkModule ) ) ]
7
8
public class SimpleTaskSystemDataModule : AbpModule
8
9
{
9
10
public override void Initialize ( )
Original file line number Diff line number Diff line change 1
1
using System . Configuration ;
2
2
using System . Reflection ;
3
3
using Abp . Modules ;
4
+ using Abp . NHibernate ;
4
5
using Abp . NHibernate . Config ;
5
6
using FluentNHibernate . Cfg . Db ;
6
7
7
8
namespace SimpleTaskSystem
8
9
{
9
- [ DependsOn ( typeof ( SimpleTaskSystemCoreModule ) ) ]
10
+ [ DependsOn ( typeof ( SimpleTaskSystemCoreModule ) , typeof ( AbpNHibernateModule ) ) ]
10
11
public class SimpleTaskSystemDataModule : AbpModule
11
12
{
12
13
public override void PreInitialize ( )
13
14
{
14
15
var connStr = ConfigurationManager . ConnectionStrings [ "Default" ] . ConnectionString ;
16
+
15
17
Configuration . Modules . AbpNHibernate ( ) . FluentConfiguration
16
18
. Database ( MsSqlConfiguration . MsSql2008 . ConnectionString ( connStr ) )
17
19
. Mappings ( m => m . FluentMappings . AddFromAssembly ( Assembly . GetExecutingAssembly ( ) ) ) ;
Original file line number Diff line number Diff line change 1
1
using System . Reflection ;
2
+ using Abp . Application . Services ;
2
3
using Abp . Modules ;
3
4
using Abp . WebApi ;
4
5
using Abp . WebApi . Controllers . Dynamic . Builders ;
5
- using SimpleTaskSystem . People ;
6
- using SimpleTaskSystem . Tasks ;
7
6
8
7
namespace SimpleTaskSystem
9
8
{
@@ -21,14 +20,8 @@ public override void Initialize()
21
20
//Creating dynamic Web Api Controllers for application services.
22
21
//Thus, 'web api layer' is created automatically by ABP.
23
22
24
- //TODO: Use ForAll!!!
25
-
26
- DynamicApiControllerBuilder
27
- . For < ITaskAppService > ( "tasksystem/task" )
28
- . Build ( ) ;
29
-
30
23
DynamicApiControllerBuilder
31
- . For < IPersonAppService > ( "tasksystem/person " )
24
+ . ForAll < IApplicationService > ( Assembly . GetAssembly ( typeof ( SimpleTaskSystemApplicationModule ) ) , "tasksystem" )
32
25
. Build ( ) ;
33
26
}
34
27
}
You can’t perform that action at this time.
0 commit comments