69
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
1 using System;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
2 using SilverlightValidation.Interfaces;
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
3
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
4 namespace SilverlightValidation.Models
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
5 {
|
78
|
6 public class UserModel : IUserModel
|
69
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
7 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
8 public string Username { get; set; }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
9 public string Email { get; set; }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
10 public string Password { get; set; }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
11 public DateTime? DateOfBirth { get; set; }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
12 public string Description { get; set; }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
13
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
14 public static UserModel Create()
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
15 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
16 return new UserModel() { Username = "", Email = "", Password = "", DateOfBirth = null, Description = "" };
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
17 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
18
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
19 public UserModel Clone()
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
20 {
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
21 return (UserModel) this.MemberwiseClone();
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
22 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
23 }
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
24 }
|