three layer architecture and linq RRS feed

  • Question

  • hello,

    i built my project in three layers- the dl, the bl and the UI which is wpf.

    originaly i accessed the db- not with linq. though now i would like any future access to be through linq to sql -

    my question is: in which layer to i put the the dbml class and the and in which layer do i query


    Thursday, December 1, 2011 3:52 PM


  • Hi,

    I would suggest have dbml file in DAL itself and do not expose IQueryable to out side, this might be obstacle for testing DAL alone, as you never know what type of query can involve I guess, but implement Repository pattern to expose CRUD related functionality to your BL.


    hope this helps you....

    If this post answers your question, please click "Mark As Answer". If this post is helpful please click "Mark as Helpful".
    Friday, December 2, 2011 7:36 AM