Getting Values from Class

Oct 30 2021 4:01 AM

New guy to .NET here, but long time SQL hand and not afraid to pay my dues.  Going through the Microsoft Learn .NET training now and making nice progess as I go through that.  I'm probably missing something really simple here.

Some parts of my .NET project are working fine, but the API I'm working with makes some user activity data available through a class, and I can't seem to find a way to get to the values in that class.

The Goal:  pull the User list from that class where the Date of the last Event was more than 90 days ago.

The Problem:  I can't find a way to get the values out of the class (once I can do that simple thing I expect to be able to work out the logic that I want to put in place)

The class looks like this:

 public class AuditEvent
        {
            public string User { get; set; }
            public string Event { get; set; }

            public System.DateTime Date { get; set; }

        }

I expect to write a method that will pull the data that I'm after, and in much research I've found examples that seem to come close, but nothing is quite right.

I expect that I'm missing something simple.

What do you think?

 


Answers (1)