|
@@ -1,5 +1,5 @@
|
1
|
1
|
using Microsoft.EntityFrameworkCore;
|
2
|
|
-using Microsoft.Data.SqlClient;
|
|
2
|
+using System.Data.SqlClient;
|
3
|
3
|
using System.Linq;
|
4
|
4
|
using UnivateProperties_API.Model;
|
5
|
5
|
using UnivateProperties_API.Model.Banks;
|
|
@@ -13,7 +13,6 @@ using UnivateProperties_API.Model.Properties;
|
13
|
13
|
using UnivateProperties_API.Model.Region;
|
14
|
14
|
using UnivateProperties_API.Model.Timeshare;
|
15
|
15
|
using UnivateProperties_API.Model.Users;
|
16
|
|
-using Microsoft.EntityFrameworkCore.SqlServer.Infrastructure.Internal;
|
17
|
16
|
|
18
|
17
|
namespace UnivateProperties_API.Context
|
19
|
18
|
{
|
|
@@ -26,11 +25,22 @@ namespace UnivateProperties_API.Context
|
26
|
25
|
{
|
27
|
26
|
if (extention.GetType().ToString() == "Microsoft.EntityFrameworkCore.SqlServer.Infrastructure.Internal.SqlServerOptionsExtension")
|
28
|
27
|
{
|
29
|
|
- connectionString = ((SqlServerOptionsExtension)extention).ConnectionString;
|
|
28
|
+ //connectionString = ((SqlServerOptionsExtension)extention).ConnectionString;
|
|
29
|
+ connectionString = ((Microsoft.EntityFrameworkCore.SqlServer.Infrastructure.Internal.SqlServerOptionsExtension)extention).ConnectionString;
|
30
|
30
|
}
|
31
|
31
|
}
|
32
|
32
|
}
|
33
|
33
|
|
|
34
|
+ public DataContext()
|
|
35
|
+ {
|
|
36
|
+ }
|
|
37
|
+
|
|
38
|
+ protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
39
|
+ {
|
|
40
|
+ optionsBuilder.EnableSensitiveDataLogging();
|
|
41
|
+
|
|
42
|
+ }
|
|
43
|
+
|
34
|
44
|
#region User
|
35
|
45
|
public virtual DbSet<Agency> Agencies { get; set; }
|
36
|
46
|
public virtual DbSet<Agent> Agents { get; set; }
|