Scala-Play-Slick-Demo/app/services/MyService.scala
2020-05-16 15:40:23 +05:30

17 lines
428 B
Scala

package service
import javax.inject._
import play.api.db.slick.DatabaseConfigProvider
import scala.concurrent.ExecutionContext
import play.api.db.slick.HasDatabaseConfigProvider
import slick.jdbc.JdbcProfile
@Singleton
class MyService @Inject() (
protected val dbConfigProvider: DatabaseConfigProvider,
implicit val ec: ExecutionContext
) extends HasDatabaseConfigProvider[JdbcProfile] {
import profile.api._
db
}