# Where does the implementation of a command / domainLogic go?
Commands must be implementated inside the respective
CommandSetCodeclass inside the domain module's src folder.For example: create command defined inside Lottery command set will need to be implemented inside
LotteryCommandSetCode.scalaclass LotteryCommandSetCode(domainLogicRef:DomainLogicRef) extends LotteryCommandSetCommands { override def create = CreateCommand { import CreateCommand._ input: Input => //todo: command logic goes here } }Domain Logic function must be implementated inside the generated
DomainLogicCodeclass inside the domain module's src folder.For example: lotteryNameExists function defined inside Lottery domain logic will need to be implemented inside
LotteryDomainLogicCode.scalaclass LotteryDomainLogicCode extends LotteryDomainLogic { override def lotteryNameExists(lotteryName: String): Boolean = { LotteryQuery().lotteryName.equalsIgnoreCase(lotteryName).exists } ... }