private void UpdateProfile(RegisterViewModel model)
 {
     //Todo
 }
        public async Task<ActionResult> Register(RegisterViewModel model)
        {
            if (ModelState.IsValid)
            {
                var user = new ApplicationUser()
                {
                    UserName = model.UserName,
                    Email = model.Email,
                    EmailConfirmed = false,
                    FirstName = model.FirstName,
                    LastName = model.LastName,
                    FullName = string.Format("{0} {1}", model.FirstName, model.LastName),
                    SkypeID = model.SkypeID,
                    Gender = model.Gender,
                    CompanyName = model.CompanyName,
                    Address = model.Address,
                    IsLocked = false,
                    DateOfBirth = model.DateOfBirth
                };

                var result = await UserManager.CreateAsync(user, model.Password);
                if (result.Succeeded)
                {
                    var m = new MailMessage();
                    m.To.Add(model.Email);
                    m.Subject = "Email confirmation";
                    m.Body = string.Format("Dear {0}<BR/>Thank you for your registration, please click on the below link to comlete your registration: <a href=\"{1}\" title=\"User Email Confirm\">{1}</a>",
                                            user.UserName,
                                            Url.Action("ConfirmEmail", "Account", new { Token = user.Id, Email = user.Email }, Request.Url.Scheme));
                    m.IsBodyHtml = true;
                    Mail.SendMail(m);
                    return RedirectToAction("Confirm", "Account", new { Email = user.Email });
                }
                else
                {
                    AddErrors(result);
                }
            }
            // If we got this far, something failed, redisplay formreturn View(model); 
            return View(model);
        }