Advertisement
Guest User

Untitled

a guest
Jul 11th, 2014
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. db.withTransaction{ implicit session =>
  2. .....
  3. }
  4.  
  5. def executeInSlickTransaction[T](body: => T) = {
  6. val db = DataSource.getDb
  7. db.withTransaction{ implicit session =>
  8. body
  9. }
  10.  
  11. }
  12.  
  13. executeInSlickTransaction{
  14. ....
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement