//-------------------------------------------------------------------------------------------------------
//
// This code was generated by EntitiesToDtos.v3.0 (entitiestodtos.codeplex.com).
// Timestamp: 2013/02/15 - 18:47:39
//
// Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
//
//-------------------------------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Text;
using System.Linq;
namespace Foghorn.Core
{
///
/// Assembler for and .
///
public static partial class SubscriberAssembler
{
///
/// Invoked when operation is about to return.
///
/// converted from .
/// converted from .
static partial void OnDto(this Subscriber entity, SubscriberDto dto);
///
/// Invoked when operation is about to return.
///
/// converted from .
/// converted from .
static partial void OnEntity(this SubscriberDto dto, Subscriber entity);
///
/// Converts this instance of to an instance of .
///
/// to convert.
public static Subscriber ToEntity(this SubscriberDto dto)
{
if (dto == null) return null;
var entity = new Subscriber();
entity.SubscriberId = dto.SubscriberId;
entity.SubscriberName = dto.SubscriberName;
entity.Port = dto.Port;
entity.HostName = dto.HostName;
entity.Password = dto.Password;
dto.OnEntity(entity);
return entity;
}
///
/// Converts this instance of to an instance of .
///
/// to convert.
public static SubscriberDto ToDto(this Subscriber entity)
{
if (entity == null) return null;
var dto = new SubscriberDto();
dto.SubscriberId = entity.SubscriberId;
dto.SubscriberName = entity.SubscriberName;
dto.Port = entity.Port;
dto.HostName = entity.HostName;
dto.Password = entity.Password;
entity.OnDto(dto);
return dto;
}
///
/// Converts each instance of to an instance of .
///
/// An ICollection of s
/// An ICollection of
public static ICollection ToEntities(this IEnumerable dtos)
{
if (dtos == null) return null;
return dtos.Select(e => e.ToEntity()).ToList();
}
///
/// Converts each instance of to an instance of .
///
/// An ICollection of s
/// An ICollection of
public static ICollection ToDtos(this IEnumerable entities)
{
if (entities == null) return null;
return entities.Select(e => e.ToDto()).ToList();
}
}
///
/// Assembler for and .
///
public static partial class NotificationAssembler
{
///
/// Invoked when operation is about to return.
///
/// converted from .
/// converted from .
static partial void OnDto(this Notification entity, NotificationDto dto);
///
/// Invoked when operation is about to return.
///
/// converted from .
/// converted from .
static partial void OnEntity(this NotificationDto dto, Notification entity);
///
/// Converts this instance of to an instance of .
///
/// to convert.
public static Notification ToEntity(this NotificationDto dto)
{
if (dto == null) return null;
var entity = new Notification();
entity.NotificationId = dto.NotificationId;
entity.NotificationTitle = dto.NotificationTitle;
entity.NotificationMessage = dto.NotificationMessage;
entity.SentDateTime = dto.SentDateTime;
entity.Priority = dto.Priority;
entity.Sticky = dto.Sticky;
dto.OnEntity(entity);
return entity;
}
///
/// Converts this instance of to an instance of .
///
/// to convert.
public static NotificationDto ToDto(this Notification entity)
{
if (entity == null) return null;
var dto = new NotificationDto();
dto.NotificationId = entity.NotificationId;
dto.NotificationTitle = entity.NotificationTitle;
dto.NotificationMessage = entity.NotificationMessage;
dto.SentDateTime = entity.SentDateTime;
dto.Priority = entity.Priority;
dto.Sticky = entity.Sticky;
entity.OnDto(dto);
return dto;
}
///
/// Converts each instance of to an instance of .
///
/// An ICollection of s
/// An ICollection of
public static ICollection ToEntities(this IEnumerable dtos)
{
if (dtos == null) return null;
return dtos.Select(e => e.ToEntity()).ToList();
}
///
/// Converts each instance of to an instance of .
///
/// An ICollection of s
/// An ICollection of
public static ICollection ToDtos(this IEnumerable entities)
{
if (entities == null) return null;
return entities.Select(e => e.ToDto()).ToList();
}
}
///
/// Assembler for and .
///
public static partial class SendingApplicationAssembler
{
///
/// Invoked when operation is about to return.
///
/// converted from .
/// converted from .
static partial void OnDto(this SendingApplication entity, SendingApplicationDto dto);
///
/// Invoked when operation is about to return.
///
/// converted from .
/// converted from .
static partial void OnEntity(this SendingApplicationDto dto, SendingApplication entity);
///
/// Converts this instance of to an instance of .
///
/// to convert.
public static SendingApplication ToEntity(this SendingApplicationDto dto)
{
if (dto == null) return null;
var entity = new SendingApplication();
entity.SendingApplicationId = dto.SendingApplicationId;
entity.SendingApplicationName = dto.SendingApplicationName;
entity.SendingApplicationIcon = dto.SendingApplicationIcon;
dto.OnEntity(entity);
return entity;
}
///
/// Converts this instance of to an instance of .
///
/// to convert.
public static SendingApplicationDto ToDto(this SendingApplication entity)
{
if (entity == null) return null;
var dto = new SendingApplicationDto();
dto.SendingApplicationId = entity.SendingApplicationId;
dto.SendingApplicationName = entity.SendingApplicationName;
dto.SendingApplicationIcon = entity.SendingApplicationIcon;
entity.OnDto(dto);
return dto;
}
///
/// Converts each instance of to an instance of .
///
/// An ICollection of s
/// An ICollection of
public static ICollection ToEntities(this IEnumerable dtos)
{
if (dtos == null) return null;
return dtos.Select(e => e.ToEntity()).ToList();
}
///
/// Converts each instance of to an instance of .
///
/// An ICollection of s
/// An ICollection of
public static ICollection ToDtos(this IEnumerable entities)
{
if (entities == null) return null;
return entities.Select(e => e.ToDto()).ToList();
}
}
///
/// Assembler for and .
///
public static partial class NotificationTypeAssembler
{
///
/// Invoked when operation is about to return.
///
/// converted from .
/// converted from .
static partial void OnDto(this NotificationType entity, NotificationTypeDto dto);
///
/// Invoked when operation is about to return.
///
/// converted from .
/// converted from .
static partial void OnEntity(this NotificationTypeDto dto, NotificationType entity);
///
/// Converts this instance of to an instance of .
///
/// to convert.
public static NotificationType ToEntity(this NotificationTypeDto dto)
{
if (dto == null) return null;
var entity = new NotificationType();
entity.NotificationTypeId = dto.NotificationTypeId;
entity.NotificationTypeName = dto.NotificationTypeName;
entity.NotificationTypeDisplayName = dto.NotificationTypeDisplayName;
entity.NotificationTypeIcon = dto.NotificationTypeIcon;
dto.OnEntity(entity);
return entity;
}
///
/// Converts this instance of to an instance of .
///
/// to convert.
public static NotificationTypeDto ToDto(this NotificationType entity)
{
if (entity == null) return null;
var dto = new NotificationTypeDto();
dto.NotificationTypeId = entity.NotificationTypeId;
dto.NotificationTypeName = entity.NotificationTypeName;
dto.NotificationTypeDisplayName = entity.NotificationTypeDisplayName;
dto.NotificationTypeIcon = entity.NotificationTypeIcon;
entity.OnDto(dto);
return dto;
}
///
/// Converts each instance of to an instance of .
///
/// An ICollection of s
/// An ICollection of
public static ICollection ToEntities(this IEnumerable dtos)
{
if (dtos == null) return null;
return dtos.Select(e => e.ToEntity()).ToList();
}
///
/// Converts each instance of to an instance of .
///
/// An ICollection of s
/// An ICollection of
public static ICollection ToDtos(this IEnumerable entities)
{
if (entities == null) return null;
return entities.Select(e => e.ToDto()).ToList();
}
}
}