I am working on a module to create event in google calendar so i want to make the json file but please tell me about the following problem. How can i give value to email of EmailAddress Class? My View Model Class is:
public class CreateJson
{
public EventTime end { get; set; }
public EventTime start { get; set; }
public string summary { get; set; }
public List<EmailAddress> attendees { get; set; }
}
public class EventTime
{
public string dateTime { get; set; }
public string timeZone { get; set; }
}
public class EmailAddress
{
public string email { get; set; }
}
My Controller Class:
CreateJson objCreateJson = new CreateJson()
{
summary = summary,
end = new EventTime()
{
dateTime =endtime,
timeZone = "America/Los_Angeles"
},
start = new EventTime()
{
dateTime = starttime,
timeZone = "America/Los_Angeles"
},
attendees =
{
???????
}
};
How can i give value to email of EmailAddress Class?