예제 #1
0
 /// <summary>Updates the specified SD.HnD.DALAdapter.EntityClasses.IPBanEntity 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 UpdateFromIPBan(this SD.HnD.DALAdapter.EntityClasses.IPBanEntity toUpdate, SD.HnD.DTOs.DtoClasses.IPBanDto dto)
 {
     if ((toUpdate == null) || (dto == null))
     {
         return;
     }
     toUpdate.IPBanSetByUserID = dto.IPBanSetByUserID;
     toUpdate.IPBanSetOn       = dto.IPBanSetOn;
     toUpdate.IPSegment1       = dto.IPSegment1;
     toUpdate.IPSegment2       = dto.IPSegment2;
     toUpdate.IPSegment3       = dto.IPSegment3;
     toUpdate.IPSegment4       = dto.IPSegment4;
     toUpdate.Range            = dto.Range;
     toUpdate.Reason           = dto.Reason;
 }
예제 #2
0
 /// <summary>Extension method which produces a projection to SD.HnD.DTOs.DtoClasses.IPBanDto which instances are projected from the
 /// SD.HnD.DALAdapter.EntityClasses.IPBanEntity 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.IPBanEntity instance created from the specified entity instance</returns>
 public static SD.HnD.DTOs.DtoClasses.IPBanDto ProjectToIPBanDto(this SD.HnD.DALAdapter.EntityClasses.IPBanEntity entity)
 {
     return(_compiledProjector(entity));
 }