wali ahmad wali ahmad - 1 month ago 6
ASP.NET (C#) Question

asp.net mvc 5 how to set number into long value like 101-2esdf-1212

simple this is the model

public class Role
{
[Key]
public int RoleID { get; set; }
public string RoleName { get; set;
}


Now for example I insert data for column name RoleName so the RoleID will be only integer like (1) if you see the default table of MVC 5 authentication model which id is like (9704b331-a8fd-494e-a280-d53312689f17) how can set or where to set to setup model for inserting long number with text instead of simple author incremented integer..

thanks in advance

SAR SAR
Answer

Rebuild and Re-Create Controller and check...

 public class Role
    {
        public Guid Id { get; set; }
        public string Name { get; set; }
    }