ASP.NET Identity

前端 未结 4 1213
生来不讨喜
生来不讨喜 2021-02-02 12:44

I\'m currently building a new ASP.NET MVC 5 project which I want to release around September. I need to choose a membership system, but I\'m currently quite confused about which

相关标签:
4条回答
  • 2021-02-02 13:21

    I believe ASP.NET is quite good framework and provide almost all required functionality for an applications. It also provide feasibility to choose type of Id column as per your choice. I created basic a wrapper over ASP.NET identity and published a nuget, so that it would be easily use. You can take a look on code at github

    0 讨论(0)
  • 2021-02-02 13:29

    I would either use the newest version of identity or build your own Account system completely. ASP.NET Identity now uses a GUID ( NVARCHAR(128) - in the db ) for the ID, however you can still use a int if you want to. I know people still using identity 1.0 with no issues I believe they used int for the Id back then.

    Either way an Id shouldnt ever clash whether its a int or a guid. as the above post said you can just Id.ToString();

    Whatever route you take I dont think it will make much of a difference.

    0 讨论(0)
  • 2021-02-02 13:36

    I would advise against using SimpleMembership as well. You can still use int IDs in your database, you would just need to ToString() the ID when plugging in your database entity, i.e.:

    public class MyUser : IUser {
       [Key]
       int UserID { get; set; }
    
       string IUser.Id { get { return UserId.ToString(); } }
    }
    
    0 讨论(0)
  • 2021-02-02 13:45

    In my opinion if you start your project with asp.net mvc 5 you should use the new membership system since it is well integrated with http://owin.org/ standards.

    0 讨论(0)
提交回复
热议问题