public static TDto ToDto <TDto>(this IEntity entity) { var factory = DtoFactory.GetFactory <IFactory <TDto> >(entity.GetType()); return(factory.Create(entity)); }
public static IDto ToDto(this IEntity entity) { var factory = DtoFactory.GetFactory(entity.GetType()); return(factory.Create(entity) as IDto); }