public RestaurantOwnerDto GetByUsernameAndPassword(RestaurantOwnerLoginDto model) { return(_mapper.Map <RestaurantOwnerDto>( _context.RestaurantOwners .Include(x => x.Restaurant) .ThenInclude(x => x.Category) .Single(x => (x.Username == model.Username) && (x.Password == model.Password)) )); }
public ActionResult <RestaurantOwnerDto> GetByUsernameAndPassword(RestaurantOwnerLoginDto model) { return(_restaurantOwnerService.GetByUsernameAndPassword(model)); }