public async Task <IEnumerable <UserDataModel> > CheckUserForLogin(UserBodyModel userBodyModel) { try { var data = await _navbarRepository.CheckUserForLogin(userBodyModel); return(data); } catch (Exception exception) { throw exception; } }
public async Task <IEnumerable <UserDataModel> > CheckUserForLogin(UserBodyModel userBodyModel) { try { return(await _connection.GetConnection.QueryAsync <UserDataModel>( sql : @"[dbo].[Usp_CheckUlerLogingInfo]", commandType : CommandType.StoredProcedure, param : userBodyModel )); } catch (Exception exception) { throw exception; } finally { _connection.Dispose(); } }
public async Task <IHttpActionResult> CheckUserForLogin([FromBody] UserBodyModel userBodyModel) { return(Ok(await _navbarService.CheckUserForLogin(userBodyModel))); }