public async Task <IActionResult> login([FromBody] PersonClientLoginRequest request) { var result = await personClientService.login(request); if (result != null) { return(Ok(result)); } return(BadRequest("Bad credetials was passed")); }
public async Task <Person> login(PersonClientLoginRequest request) { return(await dbContext.Person.Where(user => user.login == request.login && user.password == request.password).Include(user => user.Client).SingleOrDefaultAsync()); }