Пример #1
0
        public void EditFirstState()
        {
            var previousState = _states.First();
            var currentState  = RemarkState.New(previousState.User, Location,
                                                Description, createdAt: previousState.CreatedAt);

            _states.Remove(previousState);
            _states.Add(currentState);
            _states   = new HashSet <RemarkState>(_states.OrderBy(x => x.CreatedAt));
            State     = currentState;
            UpdatedAt = DateTime.UtcNow;
        }
Пример #2
0
 public Remark(Guid id, User author, Category category, Location location,
               string description = null, Group group = null)
 {
     Id = id;
     SetAuthor(author);
     SetCategory(category);
     SetLocation(location);
     SetDescription(description);
     SetGroup(group);
     SetState(RemarkState.New(Author, location, description));
     CreatedAt = DateTime.UtcNow;
     UpdatedAt = DateTime.UtcNow;
 }