Esempio n. 1
0
        public static void AddWorkshop(StringBuilder newWorkshopContents)
        {
            string[] contents = newWorkshopContents.ToString().Split(":");

            Workshop newWorkshop = new Workshop()
            {
                Id       = contents[0],
                Name     = contents[1],
                Status   = "Open",
                Duration = "Unknown"
            };

            WorkshopRepository.AddWorkshop(newWorkshop);
        }
Esempio n. 2
0
        public Workshop GetWorkshop(string id)
        {
            Workshop workshop = _workshops.SingleOrDefault(w => w.Id == id);

            return(workshop);
        }
Esempio n. 3
0
 public void AddWorkshop(Workshop workshop)
 {
     _workshops.Add(workshop);
 }