Click here to Skip to main content
15,889,992 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionAny idea on Breadcrumbs? Pin
Suraj Sahoo | Coding Passion17-Apr-14 2:20
professionalSuraj Sahoo | Coding Passion17-Apr-14 2:20 
AnswerRe: Any idea on Breadcrumbs? Pin
Wombaticus17-Apr-14 3:07
Wombaticus17-Apr-14 3:07 
GeneralRe: Any idea on Breadcrumbs? Pin
Suraj Sahoo | Coding Passion17-Apr-14 3:12
professionalSuraj Sahoo | Coding Passion17-Apr-14 3:12 
GeneralRe: Any idea on Breadcrumbs? Pin
Wombaticus17-Apr-14 6:25
Wombaticus17-Apr-14 6:25 
GeneralRe: Any idea on Breadcrumbs? Pin
Suraj Sahoo | Coding Passion17-Apr-14 6:48
professionalSuraj Sahoo | Coding Passion17-Apr-14 6:48 
Questionnullable dateTime linq query issue Pin
miss78616-Apr-14 1:28
miss78616-Apr-14 1:28 
AnswerRe: nullable dateTime linq query issue Pin
Suraj Sahoo | Coding Passion16-Apr-14 2:47
professionalSuraj Sahoo | Coding Passion16-Apr-14 2:47 
AnswerRe: nullable dateTime linq query issue Pin
Richard Deeming16-Apr-14 3:06
mveRichard Deeming16-Apr-14 3:06 
If you only want to return the upload date, change the return type of your GetDate method to DateTime? and everything should work:
C#
public DateTime? GetDate()
{
    return db.database_BD.Select(d => d.UploadDate)
             .OrderByDescending(c => c)
             .FirstOrDefault();
}



If the return type needs to be database_BD, then you'll need to return that type:
C#
public database_BD GetDate()
{
    var data = db.database_BD.Select(d => d.UploadDate)
                 .OrderByDescending(c => c)
                 .FirstOrDefault();
    
    return new database_BD { UploadDate = data };
}


If you want the full details of the latest record, then you'll need to change your query:
C#
public database_BD GetDate()
{
    return db.database_BD
             .OrderByDescending(d => d.UploadDate)
             .FirstOrDefault();
}




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: nullable dateTime linq query issue Pin
miss78616-Apr-14 3:20
miss78616-Apr-14 3:20 
GeneralRe: nullable dateTime linq query issue Pin
Richard Deeming16-Apr-14 3:24
mveRichard Deeming16-Apr-14 3:24 
QuestionNew to ASP.NET need help Pin
Hari-CodeBlogger15-Apr-14 20:13
Hari-CodeBlogger15-Apr-14 20:13 
AnswerRe: New to ASP.NET need help Pin
Tom Marvolo Riddle15-Apr-14 21:11
professionalTom Marvolo Riddle15-Apr-14 21:11 
AnswerRe: New to ASP.NET need help Pin
Schatak15-Apr-14 21:12
professionalSchatak15-Apr-14 21:12 
GeneralRe: New to ASP.NET need help Pin
Hari-CodeBlogger15-Apr-14 22:26
Hari-CodeBlogger15-Apr-14 22:26 
AnswerRe: New to ASP.NET need help Pin
thatraja16-Apr-14 3:00
professionalthatraja16-Apr-14 3:00 
AnswerRe: New to ASP.NET need help Pin
Suraj Sahoo | Coding Passion16-Apr-14 2:49
professionalSuraj Sahoo | Coding Passion16-Apr-14 2:49 
GeneralRe: New to ASP.NET need help Pin
Hari-CodeBlogger16-Apr-14 6:12
Hari-CodeBlogger16-Apr-14 6:12 
GeneralRe: New to ASP.NET need help Pin
Suraj Sahoo | Coding Passion16-Apr-14 7:08
professionalSuraj Sahoo | Coding Passion16-Apr-14 7:08 
GeneralRe: New to ASP.NET need help Pin
Hari-CodeBlogger16-Apr-14 19:17
Hari-CodeBlogger16-Apr-14 19:17 
GeneralRe: New to ASP.NET need help Pin
Suraj Sahoo | Coding Passion16-Apr-14 19:53
professionalSuraj Sahoo | Coding Passion16-Apr-14 19:53 
GeneralRe: New to ASP.NET need help Pin
Hari-CodeBlogger16-Apr-14 22:54
Hari-CodeBlogger16-Apr-14 22:54 
GeneralRe: New to ASP.NET need help Pin
Chris Quinn16-Apr-14 23:02
Chris Quinn16-Apr-14 23:02 
GeneralRe: New to ASP.NET need help Pin
Hari-CodeBlogger16-Apr-14 23:56
Hari-CodeBlogger16-Apr-14 23:56 
SuggestionRe: New to ASP.NET need help Pin
Richard Deeming17-Apr-14 2:18
mveRichard Deeming17-Apr-14 2:18 
GeneralRe: New to ASP.NET need help Pin
Hari-CodeBlogger17-Apr-14 20:04
Hari-CodeBlogger17-Apr-14 20:04 

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.