David Smith

David Smith

  • NA
  • 2k
  • 0

Complex Linq Query

Apr 20 2022 6:42 AM

I need to write a linq that give me max DetailRoot EventDate Where  DetailModel Color equals "Red". Review structure below

  Dictionary<string, List<DetailRoot>> dataList = Reporter.GetSiteData();

   public class DetailRoot
    {

        public string UserId{ get; set; }
        public string Session{ get; set; }

        public Datetime EventDate { get; set; }
        public IReadOnlyList<DetailModel> DetailList { get; set; }

    }

 public class DetailModel
    {
        public string ApplicationGuid { get; set; }
        public string ColorType { get; set; }

  }


Answers (4)