private ActionDTO MapActionToDto(Action action)
        {
            var dto = new ActionDTO();

            dto.Id   = action.Id;
            dto.Name = action.Name;
            dto.GeneralDescription = action.GeneralDescription;

            return(dto);
        }
Exemplo n.º 2
0
        private void CreateActions()
        {
            var actions = new List <Action>();

            var action = new Action();

            action.Name = "Bathing";
            action.GeneralDescription = "Wear gloves when you help with bathing.";
            actions.Add(action);

            var action1 = new Action();

            action1.Name = "Cleaning";
            action1.GeneralDescription = "Watch out for the dust.";
            actions.Add(action1);

            var action2 = new Action();

            action2.Name = "Grocery shopping";
            action2.GeneralDescription = "Take list with items from client first.";
            actions.Add(action2);

            var action3 = new Action();

            action3.Name = "Drugs shopping";
            action3.GeneralDescription = "Check prescriptions first.";
            actions.Add(action3);

            var action4 = new Action();

            action4.Name = "Transportation";
            action4.GeneralDescription = "No description.";
            actions.Add(action4);

            var action5 = new Action();

            action5.Name = "Errands";
            action5.GeneralDescription = "Discuss what exactly is needed with client.";
            actions.Add(action5);

            actions.ForEach(a => _actionIds.Add(a.Id));

            _dataContext.AddRange(actions);
            _dataContext.SaveChanges();
        }