我正在尝试实现持续集成和持续部署到我的DEV Azure应用服务.我在Visual Studio Team Services上使用托管代理.我的发行版定义中的"将网站部署到Azure"步骤一直失败,并显示错误"找不到包含指定模式的包".有任何想法吗?
我在Visual Studio中使用默认的ASP.Net MVC模板.我正在使用在模板中为我创建的ASP.Net Identity代码.我想用DBContext来了解ApplicationUser实体(AspNetUser表)和其他实体之间的关系.例如,我希望能够拥有一个ApplicationUser.Messages属性,该属性展示了ApplicationUser和Message实体之间的关系.我有一个数据访问层项目中所有非身份实体的DbContext.模板ApplicationDbContext位于UI层中.为了保持Identity实体和我的自定义实体之间的关系,我需要合并到一个DbContext中,对吗?我该怎么做呢?
以下是我的一些示例代码:
使用我的自定义Messages属性从MVC模板在UI Layer项目中为我创建的IdentityUser和DbContext:
public class ApplicationUser : IdentityUser
{
public async Task<ClaimsIdentity> GenerateUserIdentityAsync(UserManager<ApplicationUser> manager)
{
// Note the authenticationType must match the one defined in CookieAuthenticationOptions.AuthenticationType
var userIdentity = await manager.CreateIdentityAsync(this, DefaultAuthenticationTypes.ApplicationCookie);
// Add custom user claims here
return userIdentity;
}
public ICollection<Message> Messages { get; set; }
}
public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
{
public ApplicationDbContext()
: base("DefaultConnection", throwIfV1Schema: false)
{
}
public static ApplicationDbContext Create()
{
return new ApplicationDbContext();
}
}
Run Code Online (Sandbox Code Playgroud)
我在域/业务逻辑层中的Message类:
public class …Run Code Online (Sandbox Code Playgroud)