Exemplo n.º 1
0
        public void Create(ToDoTask domain)
        {
            _modelServiceTools.InitialiseNewItem(domain);

            domain.Status = ToDoTaskStatus.Ready;

            _lifeManagerRepository.SaveEntity(_toDoTaskMapper.ToEntity(domain));
        }
Exemplo n.º 2
0
        public void RemoveEntity <T>(long id) where T : class, IItemEntity
        {
            T entity = _lifeManagerRepository.LoadEntity <T>(id);

            if (entity == null)
            {
                FailReferencingVerb("remove", id, typeof(T));
            }
            else
            {
                entity.Active = false;
                _lifeManagerRepository.SaveEntity(entity);
            }
        }
Exemplo n.º 3
0
        public void Create(Chore domain)
        {
            _modelServiceTools.InitialiseNewItem(domain);

            _lifeManagerRepository.SaveEntity(_choreMapper.ToEntity(domain));
        }
Exemplo n.º 4
0
        public void Create(LeisureActivity domain)
        {
            _modelServiceTools.InitialiseNewItem(domain);

            _lifeManagerRepository.SaveEntity(_leisureActivityMapper.ToEntity(domain));
        }
Exemplo n.º 5
0
        public void Create(RecurringTask domain)
        {
            _modelServiceTools.InitialiseNewItem(domain);

            _lifeManagerRepository.SaveEntity(_recurringTaskMapper.ToEntity(domain));
        }
Exemplo n.º 6
0
        public void Create(Appointment domain)
        {
            _modelServiceTools.InitialiseNewItem(domain);

            _lifeManagerRepository.SaveEntity(_appointmentMapper.ToEntity(domain));
        }