package com.chantha.mini.service import com.chantha.mini.dto.UserDto import com.chantha.mini.repo.UserRepo import org.springframework.beans.factory.annotation.Autowired import org.springframework.stereotype.Service @Service class UserService @Autowired constructor(private val userRepo: UserRepo) { fun findByFirstNameAndLastName(firstName: String? = "", lastName: String? = ""):UserDto { return userRepo.findByFirstnameAndLastname(firstName,lastName) } fun findAllRecord():List{ return userRepo.findAll() } }