public JsonDotNetResult Edit(SchedulingEditCommand command) { return Execute( action: () => { var schedule = RavenSession.Load<Schedule>(command.Id); schedule.Update(command); RavenSession.SaveChanges(); return new JsonDotNetResult(true); }); }
public void Update(SchedulingEditCommand command) { DefaultDuration = command.DefaultDuration; DefaultWarmupTime = command.DefaultWarmupTime; DefaultBreakDuration = command.DefaultBreakDuration; DefaultAwardsDuration = command.DefaultAwardsDuration; NumberOfPanels = command.NumberOfPanels; Days = command.Days; DivisionPanels = command.DivisionPanels; this.RegisterCommand(command); }