login endpoint SES-85 #21

Merged
s426134 merged 2 commits from SES-85 into master 2020-12-10 12:52:33 +01:00
Showing only changes of commit 572b48c15e - Show all commits

View File

@ -19,6 +19,9 @@ namespace SessionCompanion.Services.Services
{ }
public async Task<UserViewModel> SearchUserByNickname(string userName)
{ var User = await Repository.Get(u => u.Nickname.Equals(userName)).FirstOrDefaultAsync(); return Mapper.Map<UserViewModel>(User); }
{

Rozbij to na linijki. Nazwa zmiennej z małej litery
public async Task SearchUserByNickname(string userName)
{
var user = await ...
.FirstOrDefaultAsync();
return Mapper....
}

Rozbij to na linijki. Nazwa zmiennej z małej litery public async Task<UserViewModel> SearchUserByNickname(string userName) { var user = await ... .FirstOrDefaultAsync(); return Mapper.... }

Coś jak masz w kontrolerze

Coś jak masz w kontrolerze
var User = await Repository.Get(u => u.Nickname.Equals(userName)).FirstOrDefaultAsync();
return Mapper.Map<UserViewModel>(User);
}
}
}