Click here to Skip to main content
15,887,585 members
Home / Discussions / C#
   

C#

 
GeneralRe: Send command To Printe Pin
Richard MacCutchan12-Jul-14 22:20
mveRichard MacCutchan12-Jul-14 22:20 
GeneralRe: Send command To Printe Pin
Dave Kreskowiak13-Jul-14 4:40
mveDave Kreskowiak13-Jul-14 4:40 
QuestionAdd other component in c# 2008 Pin
KaKoten12-Jul-14 15:30
KaKoten12-Jul-14 15:30 
AnswerRe: Add other component in c# 2008 Pin
Richard MacCutchan12-Jul-14 21:28
mveRichard MacCutchan12-Jul-14 21:28 
QuestionMutliple ResultSet from Stored Procedure using EF 5.0 Pin
meeram3912-Jul-14 12:57
professionalmeeram3912-Jul-14 12:57 
AnswerRe: Mutliple ResultSet from Stored Procedure using EF 5.0 Pin
Dave Kreskowiak13-Jul-14 4:42
mveDave Kreskowiak13-Jul-14 4:42 
GeneralRe: Mutliple ResultSet from Stored Procedure using EF 5.0 Pin
meeram3913-Jul-14 8:39
professionalmeeram3913-Jul-14 8:39 
QuestionTranslate method in Entity framework not found Pin
meeram3912-Jul-14 7:53
professionalmeeram3912-Jul-14 7:53 
I have a stored procedure that returns multiple result set. I tried to use Translate method to handle this, however, I am not able to call this method, as it is giving error such a method doesn't exist. I am using .Net Framework 4.5 and Entity Framework 5.0. Following is what I have tried.
C#
using (var db = new MyEntities())
            {
                using (IDbConnection oaConnection = db.Database.Connection)
                {
                    // 3. Create a new instance of the OACommand class.
                    using (IDbCommand oaCommand = oaConnection.CreateCommand())
                    {
                        // 4. Set the CommandType property.
                        oaCommand.CommandType = CommandType.StoredProcedure;

                        // 5. Set the CommandText property.
                        oaCommand.CommandText = "gsp_get_emp_details";
                        oaCommand.Parameters.Add(empInput.EmployeeId);
                        oaCommand.Parameters.Add(empInput.UserId);
                        oaCommand.Parameters.Add(empInput.RoleList);

                        // 6. Execute the command and materialize the car entities
                        using (IDataReader dataReader = oaCommand.ExecuteReader())
                        {
                            EmployeeData empData = db.Translate<EmployeeData>(dataReader as DbDataReader);
}
}
}
}


I tried using by calling
using System.Data.Objects;
, however it is giving compile error on db.Translate. It is giving the message that "project does not contain a definition for Translate...". May I know what's wrong with the above code? Thanks in advance for any help.
AnswerRe: Translate method in Entity framework not found Pin
Pete O'Hanlon12-Jul-14 8:54
mvePete O'Hanlon12-Jul-14 8:54 
GeneralRe: Translate method in Entity framework not found Pin
meeram3912-Jul-14 9:52
professionalmeeram3912-Jul-14 9:52 
QuestionSelf Hosted WCF + REST + CORS Pin
evolcoder11-Jul-14 22:10
evolcoder11-Jul-14 22:10 
AnswerRe: Self Hosted WCF + REST + CORS Pin
OriginalGriff11-Jul-14 22:37
mveOriginalGriff11-Jul-14 22:37 
AnswerRe: Self Hosted WCF + REST + CORS Pin
Rob Philpott11-Jul-14 22:39
Rob Philpott11-Jul-14 22:39 
GeneralRe: Self Hosted WCF + REST + CORS Pin
evolcoder14-Jul-14 17:16
evolcoder14-Jul-14 17:16 
Questionexe of C# file. Pin
Mehmood Ali Biswas11-Jul-14 21:36
Mehmood Ali Biswas11-Jul-14 21:36 
AnswerRe: exe of C# file. Pin
OriginalGriff11-Jul-14 22:36
mveOriginalGriff11-Jul-14 22:36 
AnswerRe: exe of C# file. Pin
Rob Philpott11-Jul-14 22:37
Rob Philpott11-Jul-14 22:37 
QuestionImport XML file without stylesheet Pin
Richard.Berry10011-Jul-14 19:01
Richard.Berry10011-Jul-14 19:01 
SuggestionRe: Import XML file without stylesheet Pin
Richard MacCutchan11-Jul-14 21:35
mveRichard MacCutchan11-Jul-14 21:35 
GeneralRe: Import XML file without stylesheet Pin
Richard.Berry10012-Jul-14 18:17
Richard.Berry10012-Jul-14 18:17 
GeneralRe: Import XML file without stylesheet Pin
Bernhard Hiller13-Jul-14 21:40
Bernhard Hiller13-Jul-14 21:40 
QuestionError : Method name expected // how do I fix this error. please Pin
Member 1074342211-Jul-14 17:47
Member 1074342211-Jul-14 17:47 
AnswerRe: Error : Method name expected // how do I fix this error. please Pin
Richard.Berry10011-Jul-14 19:19
Richard.Berry10011-Jul-14 19:19 
SuggestionRe: Error : Method name expected // how do I fix this error. please Pin
Richard MacCutchan11-Jul-14 21:36
mveRichard MacCutchan11-Jul-14 21:36 
QuestionWhy Sql server don't convert dateformat (dd-mm-yyyy) or (yyyy-dd-mm) ? Pin
arvind mepani11-Jul-14 4:42
arvind mepani11-Jul-14 4:42 

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.