├── .gitattributes
├── src
├── .vs
│ └── Sodao.Core
│ │ └── v15
│ │ └── Server
│ │ └── sqlite3
│ │ ├── db.lock
│ │ └── storage.ide
├── core
│ ├── Overt.Core.DataConsole
│ │ ├── appsettings.json
│ │ └── Overt.Core.DataConsole.csproj
│ ├── Overt.Core.Test
│ │ ├── appsettings.json
│ │ ├── BaseTest.cs
│ │ ├── Overt.Core.Test.csproj
│ │ └── ApplicationTest.cs
│ ├── Overt.User.Domain
│ │ ├── Contracts
│ │ │ ├── ISubDbUserRepository.cs
│ │ │ ├── IUserLongIdRepository.cs
│ │ │ ├── ISubDbUser2Repository.cs
│ │ │ ├── ISubUserRepository.cs
│ │ │ └── IUserRepository.cs
│ │ ├── Overt.User.Domain.csproj
│ │ ├── Repositories
│ │ │ ├── SubDbUserRepository.cs
│ │ │ ├── UserLongIdRepository.cs
│ │ │ ├── SubDbUser2Repository.cs
│ │ │ ├── UserRepository.cs
│ │ │ └── SubUserRepository.cs
│ │ ├── ServiceCollectionExtensions.cs
│ │ └── Entities
│ │ │ ├── UserEntity.cs
│ │ │ ├── UserLongIdEntity.cs
│ │ │ ├── SubUserEntity.cs
│ │ │ ├── SubDbUser2Entity.cs
│ │ │ └── SubDbUserEntity.cs
│ └── Overt.User.Application
│ │ ├── Constracts
│ │ ├── ISubDbUser2Service.cs
│ │ ├── ISubUserService.cs
│ │ ├── ISubDbUserService.cs
│ │ ├── IUserLongIdService.cs
│ │ └── IUserService.cs
│ │ ├── Models
│ │ ├── UserModel.cs
│ │ ├── UserPostModel.cs
│ │ └── UserSearchModel.cs
│ │ ├── Overt.User.Application.csproj
│ │ ├── ServiceCollectionExtensions.cs
│ │ ├── AutoMapperProfiles.cs
│ │ ├── Extensions
│ │ └── ModelValidationExtensions.cs
│ │ └── Services
│ │ ├── SubDbUserService.cs
│ │ ├── SubDbUser2Service.cs
│ │ ├── SubUserService.cs
│ │ └── UserLongIdService.cs
├── net46
│ ├── Overt.User.Domain
│ │ ├── packages.config
│ │ ├── Contracts
│ │ │ ├── ISubDbUserRepository.cs
│ │ │ ├── ISubDbUser2Repository.cs
│ │ │ ├── IUserRepository.cs
│ │ │ └── ISubUserRepository.cs
│ │ ├── Repositories
│ │ │ ├── SubDbUserRepository.cs
│ │ │ ├── UserRepository.cs
│ │ │ ├── SubDbUser2Repository.cs
│ │ │ └── SubUserRepository.cs
│ │ ├── AutofacExtensions.cs
│ │ ├── Entities
│ │ │ ├── UserEntity.cs
│ │ │ ├── SubUserEntity.cs
│ │ │ ├── SubDbUserEntity.cs
│ │ │ └── SubDbUser2Entity.cs
│ │ ├── Properties
│ │ │ └── AssemblyInfo.cs
│ │ └── Overt.User.Domain.csproj
│ ├── Overt.User.Application
│ │ ├── packages.config
│ │ ├── Constracts
│ │ │ ├── ISubDbUser2Service.cs
│ │ │ ├── ISubUserService.cs
│ │ │ ├── ISubDbUserService.cs
│ │ │ └── IUserService.cs
│ │ ├── Models
│ │ │ ├── UserModel.cs
│ │ │ ├── UserPostModel.cs
│ │ │ └── UserSearchModel.cs
│ │ ├── AutofacExtensions.cs
│ │ ├── AutoMapperProfiles.cs
│ │ ├── Properties
│ │ │ └── AssemblyInfo.cs
│ │ ├── Services
│ │ │ ├── SubDbUserService.cs
│ │ │ ├── SubUserService.cs
│ │ │ ├── SubDbUser2Service.cs
│ │ │ └── UserService.cs
│ │ ├── Extensions
│ │ │ └── ModelValidationExtensions.cs
│ │ └── Overt.User.Application.csproj
│ └── Overt.Core.DataConsole
│ │ ├── packages.config
│ │ ├── Properties
│ │ └── AssemblyInfo.cs
│ │ ├── AutofacContainer.cs
│ │ ├── App.config
│ │ ├── Program.cs
│ │ └── Overt.Core.DataConsole.csproj
└── Overt.Core.Data
│ ├── Constants.cs
│ ├── Enums
│ ├── FieldSortType.cs
│ ├── DataCustomType.cs
│ └── DatabaseType.cs
│ ├── Attribute
│ └── SubmeterAttribute.cs
│ ├── Expressions
│ ├── SqlExpression
│ │ ├── Resolve
│ │ │ ├── NewArraySqlExpression.cs
│ │ │ ├── ConstantSqlExpression.cs
│ │ │ ├── ListInitSqlExpression.cs
│ │ │ ├── NewSqlExpression.cs
│ │ │ ├── UnarySqlExpression.cs
│ │ │ ├── Basic
│ │ │ │ └── ISqlExpression.cs
│ │ │ ├── LambdaSqlExpression.cs
│ │ │ ├── BinarySqlExpression.cs
│ │ │ ├── MethodCallSqlExpression.cs
│ │ │ └── MemberSqlExpression.cs
│ │ ├── SqlExpressionCompiler.cs
│ │ ├── SqlGenerate.cs
│ │ ├── SqlExpression.cs
│ │ └── SqlExpressionProvider.cs
│ └── ExpressionHelper.cs
│ ├── Contract
│ └── IPropertyAssist.cs
│ ├── Extensions
│ ├── Expression.Extensions.cs
│ ├── Table.Extensions.cs
│ ├── EntityDefinition.Extensions.cs
│ └── SqlAlias.Extensions.cs
│ ├── Params
│ └── OrderByField.cs
│ ├── Overt.Core.Data.csproj
│ ├── Repository
│ └── PropertyAssist.cs
│ └── DataContext
│ ├── DataContext.cs
│ └── DataSettings.cs
├── .gitignore
├── core-data.sln
└── README.md
/.gitattributes:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/.vs/Sodao.Core/v15/Server/sqlite3/db.lock:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/.vs/Sodao.Core/v15/Server/sqlite3/storage.ide:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/overtly/core-data/HEAD/src/.vs/Sodao.Core/v15/Server/sqlite3/storage.ide
--------------------------------------------------------------------------------
/src/core/Overt.Core.DataConsole/appsettings.json:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/overtly/core-data/HEAD/src/core/Overt.Core.DataConsole/appsettings.json
--------------------------------------------------------------------------------
/src/core/Overt.Core.Test/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "ConnectionStrings": {
3 | "ss.master": "Data Source=127.0.0.1;Initial Catalog=TestDb;Persist Security Info=True;User ID=sa;Password=123456;DbType=SqlServer"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/src/net46/Overt.User.Domain/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/src/core/Overt.User.Domain/Contracts/ISubDbUserRepository.cs:
--------------------------------------------------------------------------------
1 | using Overt.Core.Data;
2 | using Overt.User.Domain.Entities;
3 |
4 | namespace Overt.User.Domain.Contracts
5 | {
6 | public interface ISubDbUserRepository : IBaseRepository
7 | {
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/net46/Overt.User.Domain/Contracts/ISubDbUserRepository.cs:
--------------------------------------------------------------------------------
1 | using Overt.Core.Data;
2 | using Overt.User.Domain.Entities;
3 |
4 | namespace Overt.User.Domain.Contracts
5 | {
6 | public interface ISubDbUserRepository : IBaseRepository
7 | {
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/Overt.Core.Data/Constants.cs:
--------------------------------------------------------------------------------
1 | namespace Overt.Core.Data
2 | {
3 | internal class Constants
4 | {
5 | public static class MSSQLVersion
6 | {
7 | ///
8 | /// SQLServer2012版本
9 | ///
10 | public const int SQLServer2012Bv = 11;
11 | }
12 |
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/core/Overt.User.Domain/Contracts/IUserLongIdRepository.cs:
--------------------------------------------------------------------------------
1 | using Overt.Core.Data;
2 | using Overt.User.Domain.Entities;
3 | using System.Collections.Generic;
4 | using System.Threading.Tasks;
5 |
6 | namespace Overt.User.Domain.Contracts
7 | {
8 | public interface IUserLongIdRepository : IBaseRepository
9 | {
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Overt.Core.Data/Enums/FieldSortType.cs:
--------------------------------------------------------------------------------
1 | namespace Overt.Core.Data
2 | {
3 | ///
4 | /// 字段排序类型
5 | ///
6 | public enum FieldSortType
7 | {
8 | ///
9 | /// 顺序
10 | ///
11 | Asc = 1,
12 | ///
13 | /// 倒序
14 | ///
15 | Desc = 2
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/core/Overt.User.Domain/Contracts/ISubDbUser2Repository.cs:
--------------------------------------------------------------------------------
1 | using Overt.Core.Data;
2 | using Overt.User.Domain.Entities;
3 | using System;
4 |
5 | namespace Overt.User.Domain.Contracts
6 | {
7 | public interface ISubDbUser2Repository : IBaseRepository
8 | {
9 | ///
10 | /// 分库标识
11 | ///
12 | DateTime SubDbAddTime { get; set; }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/net46/Overt.User.Application/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/net46/Overt.User.Domain/Contracts/ISubDbUser2Repository.cs:
--------------------------------------------------------------------------------
1 | using Overt.Core.Data;
2 | using Overt.User.Domain.Entities;
3 | using System;
4 |
5 | namespace Overt.User.Domain.Contracts
6 | {
7 | public interface ISubDbUser2Repository : IBaseRepository
8 | {
9 | ///
10 | /// 分库标识
11 | ///
12 | DateTime SubDbAddTime { get; set; }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/net46/Overt.User.Domain/Repositories/SubDbUserRepository.cs:
--------------------------------------------------------------------------------
1 | using Overt.Core.Data;
2 | using Overt.User.Domain.Contracts;
3 | using Overt.User.Domain.Entities;
4 |
5 | namespace Overt.User.Domain.Repositories
6 | {
7 | public class SubDbUserRepository : BaseRepository, ISubDbUserRepository
8 | {
9 | public SubDbUserRepository()
10 | : base("subdb")
11 | {
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/core/Overt.User.Domain/Overt.User.Domain.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp2.0
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/src/Overt.Core.Data/Attribute/SubmeterAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Overt.Core.Data
4 | {
5 | ///
6 | /// 分表标识
7 | ///
8 | [Obsolete("请使用TableNameFunc")]
9 | public class SubmeterAttribute : Attribute
10 | {
11 | ///
12 | /// 16进制位数
13 | /// 1 16
14 | /// 2 256
15 | /// 3 4096
16 | /// ...
17 | ///
18 | public int Bit { get; set; }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/core/Overt.User.Application/Constracts/ISubDbUser2Service.cs:
--------------------------------------------------------------------------------
1 | using Overt.User.Application.Models;
2 | using System.Threading.Tasks;
3 |
4 | namespace Overt.User.Application.Constracts
5 | {
6 | public interface ISubDbUser2Service
7 | {
8 | int Add(UserPostModel model);
9 | UserModel Get(int userId, bool isMaster = false);
10 |
11 | Task AddAsync(UserPostModel model);
12 |
13 | Task GetAsync(int userId, bool isMaster = false);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/net46/Overt.User.Application/Constracts/ISubDbUser2Service.cs:
--------------------------------------------------------------------------------
1 | using Overt.User.Application.Models;
2 | using System.Threading.Tasks;
3 |
4 | namespace Overt.User.Application.Constracts
5 | {
6 | public interface ISubDbUser2Service
7 | {
8 | int Add(UserPostModel model);
9 | UserModel Get(int userId, bool isMaster = false);
10 |
11 | Task AddAsync(UserPostModel model);
12 |
13 | Task GetAsync(int userId, bool isMaster = false);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/net46/Overt.User.Application/Constracts/ISubUserService.cs:
--------------------------------------------------------------------------------
1 | using Overt.User.Application.Models;
2 | using Overt.User.Domain.Entities;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace Overt.User.Application.Constracts
9 | {
10 | public interface ISubUserService
11 | {
12 | Task AddAsync(UserPostModel model);
13 |
14 | Task GetAsync(int userId, bool isMaster = false);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/net46/Overt.User.Application/Constracts/ISubDbUserService.cs:
--------------------------------------------------------------------------------
1 | using Overt.User.Application.Models;
2 | using Overt.User.Domain.Entities;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace Overt.User.Application.Constracts
9 | {
10 | public interface ISubDbUserService
11 | {
12 | Task AddAsync(UserPostModel model);
13 |
14 | Task GetAsync(int userId, bool isMaster = false);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/Overt.Core.Data/Enums/DataCustomType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace Overt.Core.Data
8 | {
9 | ///
10 | /// 自定义字段类型
11 | ///
12 | public enum DataCustomType
13 | {
14 | ///
15 | /// 未定义
16 | ///
17 | None = 0,
18 | ///
19 | /// jsonb类型
20 | ///
21 | Jsonb = 1,
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/net46/Overt.User.Domain/Contracts/IUserRepository.cs:
--------------------------------------------------------------------------------
1 | using Overt.Core.Data;
2 | using Overt.User.Domain.Entities;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace Overt.User.Domain.Contracts
9 | {
10 | public interface IUserRepository : IBaseRepository
11 | {
12 | ///
13 | /// 其他sql 本案例中 统计UserName去重个数
14 | ///
15 | ///
16 | Task> OtherSqlAsync();
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/core/Overt.User.Domain/Contracts/ISubUserRepository.cs:
--------------------------------------------------------------------------------
1 | using Overt.Core.Data;
2 | using Overt.User.Domain.Entities;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace Overt.User.Domain.Contracts
9 | {
10 | public interface ISubUserRepository : IBaseRepository
11 | {
12 | ///
13 | /// 分表标识 第二种
14 | /// 第一种为HASH模式,实体标记Submeter
15 | ///
16 | DateTime AddTime { get; set; }
17 |
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/net46/Overt.User.Domain/Contracts/ISubUserRepository.cs:
--------------------------------------------------------------------------------
1 | using Overt.Core.Data;
2 | using Overt.User.Domain.Entities;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace Overt.User.Domain.Contracts
9 | {
10 | public interface ISubUserRepository : IBaseRepository
11 | {
12 | ///
13 | /// 分表标识 第二种
14 | /// 第一种为HASH模式,实体标记Submeter
15 | ///
16 | DateTime AddTime { get; set; }
17 |
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | #
2 | #ignore thumbnails created by windows
3 | Thumbs.db
4 | #Ignore files build by Visual Studio
5 | *.obj
6 | *.exe
7 | *.pdb
8 | *.user
9 | *.aps
10 | *.pch
11 | *.vspscc
12 | *_i.c
13 | *_p.c
14 | *.ncb
15 | *.suo
16 | *.tlb
17 | *.tlh
18 | *.bak
19 | *.cache
20 | *.ilk
21 | *.log
22 | [Bb]in
23 | [Dd]ebug*/
24 | *.sbr
25 | obj/
26 |
27 | [Rr]elease*/
28 | _ReSharper*/
29 | [Tt]est[Rr]esult*
30 | packages
31 |
32 |
33 | log.txt
34 | /.vs
35 | /src/core/Overt.Core.DataConsole/appsettings.txt
36 | /src/net46/Overt.Core.DataConsole/App.txt
37 |
--------------------------------------------------------------------------------
/src/core/Overt.User.Application/Constracts/ISubUserService.cs:
--------------------------------------------------------------------------------
1 | using Overt.User.Application.Models;
2 | using Overt.User.Domain.Entities;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace Overt.User.Application.Constracts
9 | {
10 | public interface ISubUserService
11 | {
12 | int Add(UserPostModel model);
13 |
14 | UserModel Get(int userId, bool isMaster = false);
15 |
16 | Task AddAsync(UserPostModel model);
17 |
18 | Task GetAsync(int userId, bool isMaster = false);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/core/Overt.User.Application/Constracts/ISubDbUserService.cs:
--------------------------------------------------------------------------------
1 | using Overt.User.Application.Models;
2 | using Overt.User.Domain.Entities;
3 | using System;
4 | using System.Collections.Generic;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 |
8 | namespace Overt.User.Application.Constracts
9 | {
10 | public interface ISubDbUserService
11 | {
12 |
13 | int Add(UserPostModel model);
14 |
15 | UserModel Get(int userId, bool isMaster = false);
16 |
17 | Task AddAsync(UserPostModel model);
18 |
19 | Task GetAsync(int userId, bool isMaster = false);
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/core/Overt.User.Domain/Repositories/SubDbUserRepository.cs:
--------------------------------------------------------------------------------
1 | using Overt.Core.Data;
2 | using Overt.User.Domain.Contracts;
3 | using Overt.User.Domain.Entities;
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Threading.Tasks;
7 | using Dapper;
8 | using System.Linq;
9 | using Microsoft.Extensions.Configuration;
10 |
11 | namespace Overt.User.Domain.Repositories
12 | {
13 | public class SubDbUserRepository : BaseRepository, ISubDbUserRepository
14 | {
15 | public SubDbUserRepository(IConfiguration configuration)
16 | : base(configuration, "subdb")
17 | {
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/Overt.Core.Data/Enums/DatabaseType.cs:
--------------------------------------------------------------------------------
1 | namespace Overt.Core.Data
2 | {
3 | ///
4 | /// 数据库类型
5 | ///
6 | public enum DatabaseType
7 | {
8 | ///
9 | /// SqlServer
10 | ///
11 | SqlServer,
12 | ///
13 | /// >=SqlServer2012
14 | ///
15 | GteSqlServer2012,
16 | ///
17 | /// Mysql
18 | ///
19 | MySql,
20 | ///
21 | /// Sqlite
22 | ///
23 | SQLite,
24 | ///
25 | /// PostgreSQL
26 | ///
27 | PostgreSQL
28 | }
29 | }
--------------------------------------------------------------------------------
/src/core/Overt.User.Domain/Contracts/IUserRepository.cs:
--------------------------------------------------------------------------------
1 | using Overt.Core.Data;
2 | using Overt.User.Domain.Entities;
3 | using System.Collections.Generic;
4 | using System.Threading.Tasks;
5 |
6 | namespace Overt.User.Domain.Contracts
7 | {
8 | public interface IUserRepository : IBaseRepository
9 | {
10 | ///
11 | /// 其他sql 本案例中 统计UserName去重个数
12 | ///
13 | ///
14 | List OtherSql();
15 |
16 | ///
17 | /// 其他sql 本案例中 统计UserName去重个数
18 | ///
19 | ///
20 | Task> OtherSqlAsync();
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/net46/Overt.User.Domain/AutofacExtensions.cs:
--------------------------------------------------------------------------------
1 | using Autofac;
2 | using Overt.User.Domain.Contracts;
3 | using Overt.User.Domain.Repositories;
4 |
5 | namespace Overt.User.Domain
6 | {
7 | public static class AutofacExtensions
8 | {
9 | public static void AddDomainDI(this ContainerBuilder builder)
10 | {
11 | builder.RegisterType().As();
12 | builder.RegisterType().As();
13 | builder.RegisterType().As();
14 | builder.RegisterType().As();
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/core/Overt.User.Domain/Repositories/UserLongIdRepository.cs:
--------------------------------------------------------------------------------
1 | using Overt.Core.Data;
2 | using Overt.User.Domain.Contracts;
3 | using Overt.User.Domain.Entities;
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Threading.Tasks;
7 | using Dapper;
8 | using System.Linq;
9 | using Microsoft.Extensions.Configuration;
10 |
11 | namespace Overt.User.Domain.Repositories
12 | {
13 | public class UserLongIdRepository : BaseRepository, IUserLongIdRepository
14 | {
15 | public UserLongIdRepository(IConfiguration configuration)
16 | : base(configuration) // dbStoreKey 可用于不同数据库切换,连接字符串key前缀:xxx.master xxx.secondary
17 | {
18 | }
19 |
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/core/Overt.User.Application/Models/UserModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel.DataAnnotations;
4 | using System.ComponentModel.DataAnnotations.Schema;
5 | using System.Text;
6 |
7 | namespace Overt.User.Application.Models
8 | {
9 | public class UserModel
10 | {
11 | public int UserId { get; set; }
12 | public string UserName { get; set; }
13 | public string RealName { get; set; }
14 | public string Password { get; set; }
15 | public DateTime AddTime { get; set; }
16 | public bool IsSex { get; set; }
17 | ///
18 | /// Json类型
19 | ///
20 | public string JsonValue { get; set; }
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/src/net46/Overt.User.Application/Models/UserModel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel.DataAnnotations;
4 | using System.ComponentModel.DataAnnotations.Schema;
5 | using System.Text;
6 |
7 | namespace Overt.User.Application.Models
8 | {
9 | public class UserModel
10 | {
11 | public int UserId { get; set; }
12 | public string UserName { get; set; }
13 | public string RealName { get; set; }
14 | public string Password { get; set; }
15 | public DateTime AddTime { get; set; }
16 | public bool IsSex { get; set; }
17 | ///
18 | /// Json类型
19 | ///
20 | public string JsonValue { get; set; }
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/src/net46/Overt.User.Application/AutofacExtensions.cs:
--------------------------------------------------------------------------------
1 | using Autofac;
2 | using Overt.User.Application.Constracts;
3 | using Overt.User.Application.Services;
4 | using Overt.User.Domain;
5 |
6 | namespace Overt.User.Application
7 | {
8 | public static class AutofacExtensions
9 | {
10 | public static void AddApplicationDI(this ContainerBuilder builder)
11 | {
12 | builder.RegisterType().As();
13 | builder.RegisterType().As();
14 | builder.RegisterType().As();
15 | builder.RegisterType().As();
16 |
17 | builder.AddDomainDI();
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/src/Overt.Core.Data/Expressions/SqlExpression/Resolve/NewArraySqlExpression.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq.Expressions;
3 |
4 | namespace Overt.Core.Data.Expressions
5 | {
6 | class NewArraySqlExpression : BaseSqlExpression
7 | {
8 | protected override SqlGenerate In(NewArrayExpression expression, SqlGenerate sqlGenerate)
9 | {
10 | var list = new List