public BaseResponse <User> Login(FormDataCollection form) { BaseResponse <User> response = null; try { string login = form.Login; string password = form.Password; User user = businessLogicLayer.Login(login, password); response = new BaseResponse <User>(user); } catch (Exception ex) { response = new BaseResponse <User> { Error = ex.Message }; } return(response); }