/// <summary>Infrastructure. Converts contracts to entities.</summary> /// <param name="content">The content.</param> /// <returns>An entity.</returns> private static DynamicEventRotation ConvertRotationContract(RotationContract content) { Debug.Assert(content != null, "content != null"); // Create a new rotation object var value = new DynamicEventRotation(); // Set the event identifier if (content.EventId != null) { value.EventId = Guid.Parse(content.EventId); } // Set the rotating shifts if (content.Shifts != null) { value.Shifts = ConvertShiftCollectionContract(content.Shifts); } // Return the rotation object return(value); }
/// <summary>Converts contracts to entities.</summary> /// <param name="content">The content.</param> /// <returns>An entity.</returns> private static DynamicEventRotation ConvertRotationContract(RotationContract content) { Debug.Assert(content != null, "content != null"); // Create a new rotation object var value = new DynamicEventRotation(); // Set the event identifier if (content.EventId != null) { value.EventId = Guid.Parse(content.EventId); } // Set the rotating shifts if (content.Shifts != null) { value.Shifts = ConvertShiftCollectionContract(content.Shifts); } // Return the rotation object return value; }