This is a migrated thread and some comments may be shown as answers.

joins for reporting descriptions of look up table

1 Answer 43 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 08 Aug 2013, 02:38 PM
I am quite new to the entity frame work my context has created the following for me  and i am trying to retrieve the values from the following to tables as well AppraisalReadiness  and AppraisalTalentRating which are both lookup tables with the descriptions in them and a code my question is using the query below how to add the reference in for the above to table but still having it return a list.

   public List<appraisal> GetAppraisal(int employeeId)
        {
            List<appraisal> Appraisals = new List<appraisal>();

            try
            {

                Appraisals = pamsEntities.appraisals.Where(a => a.emp_no == employeeId).ToList();
            }
            catch (Exception ex)
            {
                throw new EntityContextException("GetAppraisal failed.", ex);
            }


            return Appraisals;
        }

1 Answer, 1 is accepted

Sort by
0
IvanY
Telerik team
answered on 13 Aug 2013, 09:14 AM
Hello David,

It is not very clear to us what you are trying to achieve. It seems that you are managing the lifecycle of the context object by yourself and you are creating specific methods based on it. This means that you can use ObjectDataSource and it will be easier for you to do so. In case you start using or you are using directly the members of the context it will be easier for you to use the EntityDataSource.

You can have a look at both data sources in the ObjectDataSource Component and EntityDataSource Component help articles and the related subarticles.

Regards,
IvanY
Telerik

Have you tried the new visualization options in Telerik Reporting Q2 2013? You can get them from your account.

Tags
General Discussions
Asked by
David
Top achievements
Rank 1
Answers by
IvanY
Telerik team
Share this question
or