9a6267c6bd6eae31b86f22c983ea65883bd30106
Guides/MVC-Integration/Phase-II-Draft.md
| ... | ... | @@ -59,6 +59,33 @@ Since the link to Izenda will be visible only to logged in users, cut the action |
| 59 | 59 | |
| 60 | 60 | ### Step 4. Add Login User Model |
| 61 | 61 | |
| 62 | +**a.** Right click on Models folder -> Add -> New Item -> Choose class. Name it User.cs ->Add |
|
| 63 | + |
|
| 64 | +**b.** Copy and paste below code in User.cs |
|
| 65 | + |
|
| 66 | +```csharp |
|
| 67 | +using System; |
|
| 68 | +using System.Collections.Generic; |
|
| 69 | +using System.ComponentModel.DataAnnotations; |
|
| 70 | +using System.Linq; |
|
| 71 | +using System.Web; |
|
| 72 | + |
|
| 73 | +namespace Sample_MVCApp.Models { |
|
| 74 | + public class User { |
|
| 75 | + [Required] |
|
| 76 | + [Key] |
|
| 77 | + public string Username { get; set; } |
|
| 78 | + [Required] |
|
| 79 | + public string Password { get; set; } |
|
| 80 | + } |
|
| 81 | +} |
|
| 82 | + |
|
| 83 | + |
|
| 84 | +``` |
|
| 85 | + |
|
| 86 | + |
|
| 87 | + |
|
| 88 | + |
|
| 62 | 89 | ### Step 5. Add Controller |
| 63 | 90 | |
| 64 | 91 | ### Step 6. Add Views |