public User Clone() { User user = new User(); user.Copy(this); return(user); }
public static bool Authenticate(Entities.User user) { foreach (User item in users) { if (string.Equals(item.Name, user.Name, StringComparison.InvariantCulture) && item.Password == user.Password) { if (item.IsEnabled) { item.IsAuthenticated = true; DomainModel.Application.User = item; user.Copy(item); //user.IsAuthenticated = true; } break; } } return(user.IsAuthenticated); }