ABPCMS.EntityFramework/EntityFramework/ABPCMSDbContext.cs
(完整代码) 1KBusing System.Data.Common;
using Abp.Zero.EntityFramework;
using ABPCMS.Authorization.Roles;
using ABPCMS.Authorization.Users;
using ABPCMS.MultiTenancy;
namespace ABPCMS.EntityFramework
{
public class ABPCMSDbContext : AbpZeroDbContext<Tenant, Role, User>
{
//TODO: Define an IDbSet for your Entities...
/* NOTE:
* Setting "Default" to base class helps us when working migration commands on Package Manager Console.
* But it may cause problems when working Migrate.exe of EF. If you will apply migrations on command line, do not
* pass connection string name to base classes. ABP works either way.
*/
public ABPCMSDbContext()
: base("Default")
{
}
/* NOTE:
* This constructor is used by ABP to pass connection string defined in ABPCMSDataModule.PreInitialize.
* Notice that, actually you will not directly create an instance of ABPCMSDbContext since ABP automatically handles it.
*/
public ABPCMSDbContext(string nameOrConnectionString)
: base(nameOrConnectionString)
{
}
//This constructor is used in tests
public ABPCMSDbContext(DbConnection existingConnection)
: base(existingConnection, false)
{
}
public ABPCMSDbContext(DbConnection existingConnection, bool contextOwnsConnection)
: base(existingConnection, contextOwnsConnection)
{
}
}
}
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
