Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8460921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:44:15+00:00 2026-06-10T13:44:15+00:00

There are several same questions that have same problem. But I cant find solution

  • 0

There are several same questions that have same problem. But I cant find solution for me.

LinQ

var result = (from a in entity.TblAnalizorReadings
             group a by new { date = new DateTime(((DateTime)a.okuma_tarihi).Year, ((DateTime)a.okuma_tarihi).Month, ((DateTime)a.okuma_tarihi).Day, ((DateTime)a.okuma_tarihi).Hour, 0, 0) } into g
             select new AnalizorPivotChartModel
             {
                  okuma_tarihi = g.Key.date,
                  Gerilim_Faz1 = g.Max(x => x.Gerilim_Faz1),
                  Gerilim_Faz2 = g.Max(x => x.Gerilim_Faz2),
                  Gerilim_Faz3 = g.Max(x => x.Gerilim_Faz3)
              }).ToList();

Model

public class AnalizorPivotChartModel
{
    public Nullable<System.DateTime> okuma_tarihi { get; set; }
    public Nullable<decimal> Gerilim_Faz1 { get; set; }
    public Nullable<decimal> Gerilim_Faz2 { get; set; }
    public Nullable<decimal> Gerilim_Faz3 { get; set; }
}

I get error message as this question title. I can write more code if its neccesary.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T13:44:17+00:00Added an answer on June 10, 2026 at 1:44 pm
    var result = entity.TblAnalizorReadings
        .GroupBy(a =>
            new {
                ((DateTime)a.okuma_tarihi).Year,
                ((DateTime)a.okuma_tarihi).Month,
                ((DateTime)a.okuma_tarihi).Day,
                ((DateTime)a.okuma_tarihi).Hour
            },
            (k, g) => new {
                okuma_tarihi = k,
                Gerilim_Faz1 = g.Max(x => x.Gerilim_Faz1),
                Gerilim_Faz2 = g.Max(x => x.Gerilim_Faz2),
                Gerilim_Faz3 = g.Max(x => x.Gerilim_Faz3)
            })
        .AsEnumerable()
        .Select(g => new AnalizorPivotChartModel
             {
                  okuma_tarihi = new DateTime(okuma_tarihi.Year, okuma_tarihi.Month, okuma_tarihi.Day, okuma_tarihi.Hour, 0, 0),
                  Gerilim_Faz1 = g.Gerilim_Faz1,
                  Gerilim_Faz2 = g.Gerilim_Faz2,
                  Gerilim_Faz3 = g.Gerilim_Faz3
              })
        .ToList();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There are several other questions about this topic that I have gone through, but
I know there are several questions similar, but I can't find one that answers
There are several variant questions on this on SO, but I did not find
Sometimes we have several classes that have some methods with the same signature, but
I know there have been several questions in the past regarding things that compile
There are several threads on this here at SO but I didn't find one
I know there are several questions asking the same question Why should I use
I have been pouring over many forums and questions similar (but not the same)
There are several places on the internet that talk about having multy key dictionary
There are several resources out there that explain how the sandbox in Chrome works

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.