public bool IsValidUser(string userName, string password)
        {
            User user;

            password = HashUtility.MD5Hash(password);
            user     = context.Users.Where(x => x.UserName == userName && x.Password == password)
                       .SingleOrDefault();
            return((user != null) ? true : false);
        }
        public void CreateNewUser(UserRegistrationFormData data)
        {
            context.Users.Add(new User()
            {
                UserName = data.UserName,
                Email    = data.Email,
                Password = HashUtility.MD5Hash(data.Password),
                UserType = context.UserTypes.Find(UserTypeEnum.User)
            });

            context.SaveChanges();
        }