none
3 tier app with data.entity ? RRS feed

  • Question

  • If I built a 3 tier application with entity model.

    - dal- entity modals are here

    -bsl - linq functions to query entity models are here. has dal reference

    -web app : has bsl reference

    so when I have function something like below in bsl which queries 

     

     Public
     Function
     getStudentsSP(ByVal
     ID As
     Integer
    ) As
     Data.Objects.ObjectResult(Of Student)
    
     Dim
     myEntity As
     New
     StudentEntities
    
     Dim
     myStudent = myEntity.select_StudentbyID(ID)
    
     Return
     myStudent
    
    
     End
     Function
    
    
    

    It returns ObjectResult(Of Student) back to my webapp class where I call this function.

    So now in order to use this object directly on the web app, i have to add reference of system.data.entity and dal project

    or I need to write myself a student class in bsl and have to convert ObjectResult(Of Student) to list of student (generic object)

    Is there any other way? how do people work with this kind of 3 tier apps?

    thanks

     


    "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it."
    • Edited by emil_tr Sunday, November 28, 2010 11:48 AM
    Saturday, November 27, 2010 4:56 PM

Answers

All replies