none
what is the best way to use linq in 3-tire application ? RRS feed

  • Question

  • hi...

    I want to user Linq to Sql in my project ... 

    should i create Classes for each linq to sql class and perform operation on that classes ... 

    If there is table A in DB...Now I have created one ClassLibrary Project and added Linq to SQL class .dbml file ...

    it's create class for  table A ... now what should i do ... Create My coustom class same as A that is genareted in .dbml file and perform operation usign My class by assigning each property to object of .dbml files class A's obj and then perform CURD operation 

    or should I just create object of Class A from .dbml file ... and perform CURD ...

    Wednesday, December 25, 2013 7:08 AM

Answers

  • Hello,

    If you want to have a better performance, then I think it is better to choice just create object of Class A from .dbml file and perform CURD because it do not need to experience the translation step between entity classes and custom classes.

    If you want to hide some fields which you do not want users to see for some security features, I suggest using the custom class and just need to expose these custom classes to users.

    If I misunderstand, please let me know.

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, December 26, 2013 1:37 AM
    Moderator