public IActionResult Add([FromBody] PlanningCardsTemplate request)
        {
            var room = new PlanningCardsTemplate();

            repository.Insert(room);
            return(Ok(room.Id));
        }
 public void Update(PlanningCardsTemplate entity)
 {
     if (!_templates.ContainsKey(entity.Id))
     {
         return;
     }
     _templates[entity.Id] = entity;
 }
        public InMemoryCardsTemplateRepository()
        {
            var template = new PlanningCardsTemplate
            {
                Id    = Guid.NewGuid(),
                Name  = "Test template",
                Cards = new HashSet <PlanningCard>(Enumerable.Range(1, 6)
                                                   .Select(num => new PlanningCard
                {
                    Id      = Guid.NewGuid(),
                    Display = num.ToString(),
                    Value   = num.ToString()
                }))
            };

            _templates.TryAdd(template.Id, template);
        }
 public void Insert(PlanningCardsTemplate entity)
 {
     _templates.TryAdd(entity.Id, entity);
 }