/// <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)); }
/// <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))); }