public async Task <UsuarioVm> ObtenerUsuario(string userName, string password) { if (string.IsNullOrWhiteSpace(userName)) { throw new NullReferenceException("You must specify the username"); } if (string.IsNullOrWhiteSpace(password)) { throw new NullReferenceException("You must specify the password"); } var usuario = await _repository.ObtenerUsuario(userName, password); return(UsuarioFactory.Crear(usuario)); }