public PeanutUpdateCommand() { PeanutDto = new PeanutDto(); Requirements = new Dictionary <string, RequirementDto>(); PeanutCommentCreateCommand = new PeanutCommentCreateCommand(); PeanutState = PeanutState.Scheduling; }
public PeanutUpdateCommand(Core.Domain.Peanuts.Peanut peanut) { Require.NotNull(peanut, "peanut"); PeanutDto = peanut.GetDto(); Requirements = peanut.Requirements.ToDictionary(r => Guid.NewGuid().ToString(), r => r.GetDto()); PeanutCommentCreateCommand = new PeanutCommentCreateCommand(); PeanutState = peanut.PeanutState; }