public static Community ToCommunity(this CommunityV1DTO item) { if (item == null) { throw new ArgumentException(nameof(item)); } Community community = new Community(); community.CopyFromCommunityV1DTO(item); return(community); }
public static CommunityV1DTO ToCommunityV1DTO(this Community item) { if (item == null) { throw new ArgumentException(nameof(item)); } CommunityV1DTO communityV1DTO = new CommunityV1DTO(); communityV1DTO.CopyFromCommunity(item); return(communityV1DTO); }
public static void CopyFromCommunity(this CommunityV1DTO to, Community from) { to.CommunityId = from.CommunityId; to.CommunityName = from.CommunityName; to.CommunityDescription = from.CommunityDescription; }