As a developer, I need to set up data storage for my various events
AC
Dev notes
Event repository will create a List of events and also hold an Event class
Creates new List to hold Events = static List<Event> _events = new List<Event>();
Event Class
The Event class will include Location, Date, ID, IsPutRight, and Host
Location - readonly string _location - Set in constructor
Date - readonly string _date - Set in constructor
ID - readonly GUID _id - Set in constructor
Host - readonly string _host - Set in constructor
IsPutRight - public bool IsPutRight { get; set; } - set to false by default
Event Repository needs the following methods:
GetAllEvents - Returns a List of Event instances
Values will be set in using an object initializer.
UpdateEvent - Returns a single event, takes Event.Id and Event.IsPutRight as a parameter
var user = _users.First(x => x.Id == userId); = Example of grabbing an event by its ID
User Story
As a developer, I need to set up data storage for my various events
AC
Dev notes
static List<Event> _events = new List<Event>();
Event Class
readonly string _location
- Set in constructorreadonly string _date
- Set in constructorreadonly GUID _id
- Set in constructorreadonly string _host
- Set in constructorpublic bool IsPutRight { get; set; }
- set to false by defaultEvent Repository needs the following methods:
Event.Id
andEvent.IsPutRight
as a parametervar user = _users.First(x => x.Id == userId);
= Example of grabbing an event by its ID