Print Page | Close Window

Selecting different views using the Entity Framework

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=2429
Printed Date: 08-May-2025 at 9:57pm


Topic: Selecting different views using the Entity Framework
Posted By: MrTouya
Subject: Selecting different views using the Entity Framework
Date Posted: 09-Jan-2011 at 7:03am

Hi Guys,

I hope this is the right place for this question. I have an application that I am trying to convert from using a straight ADO.NET to sql server connection and I want to use the Entity Framework. In my app the when the user logs on they are presented with a drop down box of views that are associated with the user's ID number. For example, let's say the following views exists:

  • 3050_CUSTOMER_VIEW
  • 3050_ORDERS_VIEW
  • 3051_CUSTOMER_VIEW
  • 3051_ORDERS_VIEW

 Once the user selects logs on, they only see the customer view that they are allowed to see. A user with ID number 3050 will only be able to see the 3050 views and a user with the ID 3051 will only be able to see the 3051 views. The underlying views have complex aggregates that are different for each user.

How can I create an Entity Model that can support something like this? I was thinking of using a stored procedure mapped to an entity, but I am not sure how to acheive this.

In my C# app I want to present a drop down box with views that are associcated with a users's ID and the user will be able to build queries that execute against the selected view.

Can someone point me in the right direction?

Thanks,

Stephane




Replies:
Posted By: DenisK
Date Posted: 10-Jan-2011 at 4:47pm
Hi Stephane;

This question is outside of DevForce support scope. Someone from the Professional Services will be in touch with you soon.



Print Page | Close Window