public IActionResult Login(Customer customer) { IActionResult res = null; var response = new LoginResponse(); //Validation if (!Regex.IsMatch(customer.Email, @"^[^@\s]+@[^@\s]+\.[^@\s]+$")) { response.Success = false; response.FailureInformation = "EMail ID not in proper format!"; } else { response = _shoppingRepository.FetchLoginStatus(customer); } res = Ok(response); return(res); }