public void Authenticate()
        {
            var usersRepository = new UsersRepository(new MainUnitOfWork(ConfigurationManager.AppSettings["AzureConnectionString"]));

            var request = new AuthenticationRequest();
            var result = usersRepository.Authenticate(9822559890, "test123");
            Assert.IsNotNull(result);
        }
 public JsonResult Authenticate(AuthenticationRequest request)
 {
     var result = new AuthenticationResult();
 
     var userProfile = usersRepository.Authenticate(request.MobileNumber, request.Password);
     if (userProfile == null)
     {
         result.IsSuccess = false;
         result.ErrorMessage = "Login Failure: Either the Mobile Number or Password is Incorrect.";
     }
     else
     {
         result.IsSuccess = true;
         result.Profile = userProfile;
     }
     return Json(result, JsonRequestBehavior.AllowGet);
 }