Guest User

Untitled

a guest
Jul 22nd, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. using System;
  2. using System.Linq;
  3.  
  4. public interface IProjectionExpression<TSource>
  5. {
  6. /// <summary>
  7. /// Project a elements of a query to a to a compatible model.
  8. /// </summary>
  9. /// <remarks>
  10. /// Each property of <typeparamref name="TDest"/> is expected in <typeparamref name="TSource"/> with
  11. /// the same name. The source property is assigned to the destination property, and hence must be of the same
  12. /// type or implicitly castable.
  13. /// </remarks>
  14. /// <typeparam name="TDest"></typeparam>
  15. /// <returns></returns>
  16. IQueryable<TDest> To<TDest>();
  17.  
  18. /// <summary>
  19. /// Project a elements of a query to a different shape, with custom mappings.
  20. /// </summary>
  21. /// <typeparam name="TDest"></typeparam>
  22. /// <remarks>
  23. /// Each property of <typeparamref name="TDest"/> is expected in <typeparamref name="TSource"/> with
  24. /// the same name. The source property is assigned to the destination property, and hence must be of the same
  25. /// type or implicitly castable.
  26. /// <para/>
  27. /// For destination properties that are not represented by name in the source, or that are not of the same type of that
  28. /// cannot be case implicitly, use the <param name="customMapper"/> to assign a value to the property.
  29. /// </remarks>
  30. /// <returns></returns>
  31. IQueryable<TDest> To<TDest>(Action<Mapper<TSource, TDest>> customMapper);
  32. }
Add Comment
Please, Sign In to add comment