Scala-Play-Slick-Demo/app/services/MyService.scala

17 lines
428 B
Scala
Raw Normal View History

2020-05-16 10:10:23 +00:00
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
}