/// <summary>Updates the specified SD.HnD.DALAdapter.EntityClasses.SectionEntity entity with the values stored in the dto object specified</summary> /// <param name="toUpdate">the entity instance to update.</param> /// <param name="dto">The dto object containing the source values.</param> /// <remarks>The PK field of toUpdate is set only if it's not marked as readonly.</remarks> public static void UpdateFromSection(this SD.HnD.DALAdapter.EntityClasses.SectionEntity toUpdate, SD.HnD.DTOs.DtoClasses.SectionDto dto) { if ((toUpdate == null) || (dto == null)) { return; } toUpdate.OrderNo = dto.OrderNo; toUpdate.SectionDescription = dto.SectionDescription; toUpdate.SectionName = dto.SectionName; }
/// <summary>Extension method which produces a projection to SD.HnD.DTOs.DtoClasses.SectionDto which instances are projected from the /// SD.HnD.DALAdapter.EntityClasses.SectionEntity entity instance specified, the root entity of the derived element returned by this method.</summary> /// <param name="entity">The entity to project from.</param> /// <returns>SD.HnD.DALAdapter.EntityClasses.SectionEntity instance created from the specified entity instance</returns> public static SD.HnD.DTOs.DtoClasses.SectionDto ProjectToSectionDto(this SD.HnD.DALAdapter.EntityClasses.SectionEntity entity) { return(_compiledProjector(entity)); }