예제 #1
0
파일: Class.cs 프로젝트: Worble/DndHelper
 /// <summary>
 /// Gets the dto.
 /// </summary>
 /// <param name="context">The context.</param>
 /// <param name="id">The identifier.</param>
 /// <returns></returns>
 internal static ClassDTO GetDTO(DndDmHelperContext context, int id)
 {
     return(context.Classes
            .Select(e => ClassDTO.CreateDTOFromClass(e))
            .FirstOrDefault(e => e.ID == id));
 }
예제 #2
0
파일: Class.cs 프로젝트: Worble/DndHelper
 /// <summary>
 /// Gets all the classes
 /// </summary>
 /// <param name="context">The context.</param>
 /// <returns></returns>
 internal static IEnumerable <ClassDTO> GetAll(DndDmHelperContext context)
 {
     return(context.Classes
            .Select(e => ClassDTO.CreateDTOFromClass(e)));
 }