Click here to Skip to main content
15,898,222 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionPass dataview to javascript [modified] Pin
zeeShan anSari13-Aug-09 6:21
zeeShan anSari13-Aug-09 6:21 
AnswerRe: Pass dataview to javascript Pin
Abhishek Sur13-Aug-09 8:50
professionalAbhishek Sur13-Aug-09 8:50 
Questiona simple question about design patterns [modified] Pin
Mark Kamoski13-Aug-09 4:41
Mark Kamoski13-Aug-09 4:41 
AnswerRe: a simple question about design patterns Pin
Jeremy Likness13-Aug-09 5:20
professionalJeremy Likness13-Aug-09 5:20 
GeneralRe: a simple question about design patterns Pin
Mark Kamoski13-Aug-09 5:35
Mark Kamoski13-Aug-09 5:35 
GeneralRe: a simple question about design patterns Pin
Jeremy Likness13-Aug-09 6:17
professionalJeremy Likness13-Aug-09 6:17 
GeneralRe: a simple question about design patterns Pin
N a v a n e e t h13-Aug-09 15:55
N a v a n e e t h13-Aug-09 15:55 
GeneralRe: a simple question about design patterns Pin
Mark Kamoski17-Aug-09 3:23
Mark Kamoski17-Aug-09 3:23 
Navaneeth --

Regarding this...

>>>Each entity object is a different type. How can you make a single typed collection which are different types?

...that was actually pretty simple. At the implementation level, everything comes back as "IQueryable" and the underlying EntitySet is of the particular type needed. The call-site casts, which is not too much of a burden-- the caller must know what its asking for in a return or must live with a generic IQueryable object. It actually works quite well. Etc. Everything is pretty simple, as follows.

This is the interface that is implemented by each EntityManager...

<br />
...<br />
public interface IL2sEntityManager<br />
...<br />
IQueryable Retrieve();<br />
...<br />


This is a sample of what an EntityManager looks like...

This is the code being called...

<br />
...<br />
public partial class CategoryCodeManager : Team.Framework.Interfaces.BusinessLayer.BusinessEntities.IL2sEntityManager<br />
...<br />
public IQueryable Retrieve()<br />
...<br />


This is a sample call-site...

<br />
...<br />
protected void DataBindTest1()<br />
{<br />
    BusinessLayer.BusinessManagers.CategoryCodeManager myManager = new BusinessLayer.BusinessManagers.CategoryCodeManager();<br />
<br />
    IQueryable<BusinessLayer.BusinessEntities.CategoryCode> myEntitySet = (IQueryable<BusinessLayer.BusinessEntities.CategoryCode>)myManager.Retrieve();<br />
<br />
    this.EntitySetGridView.DataSource = myEntitySet;<br />
<br />
    this.EntitySetGridView.DataBind();<br />
}<br />


Etc.

I hope that answers your question.

Thank you.

-- Mark Kamoski
AnswerRe: a simple question about design patterns Pin
Mark Kamoski17-Aug-09 3:26
Mark Kamoski17-Aug-09 3:26 
Questionglobal.asax redirect failing on windows 2008 box Pin
wolfbinary13-Aug-09 4:38
wolfbinary13-Aug-09 4:38 
AnswerRe: global.asax redirect failing on windows 2008 box Pin
Abhijit Jana13-Aug-09 19:17
professionalAbhijit Jana13-Aug-09 19:17 
GeneralRe: global.asax redirect failing on windows 2008 box Pin
wolfbinary21-Aug-09 10:32
wolfbinary21-Aug-09 10:32 
Questionstream reader Pin
lagan13-Aug-09 3:51
lagan13-Aug-09 3:51 
AnswerRe: stream reader Pin
DoctorMick13-Aug-09 6:11
DoctorMick13-Aug-09 6:11 
GeneralRe: stream reader Pin
lagan13-Aug-09 6:46
lagan13-Aug-09 6:46 
AnswerRe: stream reader Pin
N a v a n e e t h13-Aug-09 15:42
N a v a n e e t h13-Aug-09 15:42 
QuestionASP.NET is not authorized to access the requested resource. Pin
vandanaconedify13-Aug-09 3:15
vandanaconedify13-Aug-09 3:15 
AnswerRe: ASP.NET is not authorized to access the requested resource. Pin
Coding C#13-Aug-09 3:34
Coding C#13-Aug-09 3:34 
QuestionPlaceholder Pin
Ramkumar_S13-Aug-09 3:03
Ramkumar_S13-Aug-09 3:03 
AnswerRe: Placeholder Pin
Christian Graus13-Aug-09 14:42
protectorChristian Graus13-Aug-09 14:42 
QuestionClientID messes with my textbox - please help Pin
Axonn Echysttas13-Aug-09 1:49
Axonn Echysttas13-Aug-09 1:49 
AnswerRe: ClientID messes with my textbox - please help Pin
Abhishek Sur13-Aug-09 2:15
professionalAbhishek Sur13-Aug-09 2:15 
GeneralRe: ClientID messes with my textbox - please help Pin
Axonn Echysttas13-Aug-09 3:36
Axonn Echysttas13-Aug-09 3:36 
GeneralRe: ClientID messes with my textbox - please help Pin
Abhishek Sur13-Aug-09 4:33
professionalAbhishek Sur13-Aug-09 4:33 
Questionsend xml file to client site Pin
zeeShan anSari13-Aug-09 1:26
zeeShan anSari13-Aug-09 1:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.