0

I have the following code whenever I need to access the database, which is everywhere:

withSession {implicit session : Session =>
    ...
}

How do I stop having to type so much?

John Tseng
  • 6,262
  • 2
  • 27
  • 35

1 Answers1

0

Here is a pattern for this: http://slick.typesafe.com/doc/2.0.0-RC1/connection.html#passing-sessions-around

Also the :Session goes away in Slick 2.0

cvogt
  • 11,260
  • 30
  • 46