public virtual void Update(PeanutDto peanutDto, IList <RequirementDto> requirements, EntityChangedDto entityChanged) { Require.NotNull(peanutDto, "peanutDto"); Require.NotNull(entityChanged, "entityChanged"); Require.NotNull(requirements, "requirements"); Update(peanutDto); Update(requirements); Update(entityChanged); }
public Peanut(UserGroup userGroup, PeanutDto peanutDto, IList <RequirementDto> requirements, IDictionary <UserGroupMembership, PeanutParticipationDto> participators, EntityCreatedDto entityCreatedDto) : this(userGroup, peanutDto, requirements, entityCreatedDto) { Require.NotNull(participators, "participators"); foreach (KeyValuePair <UserGroupMembership, PeanutParticipationDto> participation in participators) { _participations.Add(new PeanutParticipation(this, participation.Key, participation.Value, entityCreatedDto)); } }
public Peanut(UserGroup userGroup, PeanutDto peanutDto, IList <RequirementDto> requirements, EntityCreatedDto entityCreatedDto) { Require.NotNull(userGroup, "userGroup"); Require.NotNull(peanutDto, "peanutDto"); Require.NotNull(entityCreatedDto, "entityCreatedDto"); Require.NotNull(requirements, "requirements"); _userGroup = userGroup; Update(peanutDto); Update(requirements); _createdBy = entityCreatedDto.CreatedBy; _createdAt = entityCreatedDto.CreatedAt; }
protected bool Equals(PeanutDto other) { return(Day.Equals(other.Day) && string.Equals(Description, other.Description) && string.Equals(Name, other.Name)); }
private void Update(PeanutDto peanutDto) { _name = peanutDto.Name; _day = peanutDto.Day; _description = peanutDto.Description; }