c# – 错误:在Visual Studio 2013中找不到类型或命名空间名称“ApplicationUser”

前端之家收集整理的这篇文章主要介绍了c# – 错误:在Visual Studio 2013中找不到类型或命名空间名称“ApplicationUser”前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在关注“RESTful WCF服务”教程.但是,当我构建我的应用程序时,我收到此错误

The type or namespace name ‘ApplicationUser’ could not be found (are you missing a using directive or an assembly reference?)@H_403_4@ c:\users\basma\documents\visual studio 2013\Projects\OnlineStore2\OnlineStore2_Client\App_Start\IdentityConfig.cs

搜索了很多答案,其中谈到“Microsoft ASP.NET Identity.owin”,但我添加了这个引用,但仍然得到这个错误

解决方法

创建一个名为ApplicationUser的类,该类派生自IdentityUser.它不需要任何属性方法,但您可以随意扩展它,以及您希望存储的有关系统上每个用户的任何信息(想想名称,地址等).
public class ApplicationUser : IdentityUser
{
    public virtual string Email { get; set; } // example,not necessary
}
原文链接:https://www.f2er.com/csharp/99845.html

猜你在找的C#相关文章