-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOracleRepository.cs
More file actions
70 lines (60 loc) · 1.85 KB
/
Copy pathOracleRepository.cs
File metadata and controls
70 lines (60 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
using Common.DB;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq.Expressions;
namespace Repository
{
public class OracleRepository : DbRepository, IRepository
{
#region 构造函数
/// <summary>
/// 构造函数
/// </summary>
public OracleRepository()
: base(null, DatabaseType.Oracle, null)
{
}
/// <summary>
/// 构造函数
/// </summary>
/// <param name="conStr">数据库连接名</param>
public OracleRepository(string conStr)
: base(conStr, DatabaseType.Oracle, null)
{
}
/// <summary>
/// 构造函数
/// </summary>
/// <param name="conStr">数据库连接名</param>
/// <param name="entityNamespace">实体命名空间</param>
public OracleRepository(string conStr, string entityNamespace)
: base(conStr, DatabaseType.Oracle, entityNamespace)
{
}
/// <summary>
/// 构造函数
/// </summary>
/// <param name="dbContext">数据库连接上下文</param>
public OracleRepository(DbContext dbContext)
: base(dbContext, DatabaseType.Oracle, null)
{
}
#endregion
#region 插入数据
/// <summary>
/// 使用Bulk批量插入数据(适合大数据量,速度非常快)
/// </summary>
/// <typeparam name="T">实体类型</typeparam>
/// <param name="entities">数据</param>
public override void BulkInsert<T>(List<T> entities)
{
throw new Exception("抱歉!暂不支持Oracle!");
}
public override void Delete_Sql<T>(Expression<Func<T, bool>> condition)
{
Delete(condition);
}
#endregion
}
}