public async Task <UserEntity> Authenticate(Authenticate entity) { try { return(await dapperHelper.ExecuteSP_Single_ParentChild <UserEntity, RoleEntity, int>(User.AUTHENTICATE, company => company.RoleId, company => company.Roles, new { @UserLogin = entity.userLogin, @UserPassword = entity.userPassword, @CompanyCode = entity.companyCode }, splitOn : "RoleId")); } catch (Exception e) { throw e; } }