private static async Task GetMaterialsByPrefixWithSubTablesAsync() { const string MATERIAL_PREFIX = "11AKPAK"; const int RECORD_COUNT = 10; IMaterialManager manager = ServiceProvider.GetRequiredService <IMaterialManager>(); List <Material> result = await manager.GetMaterialsByPrefixWithSubTablesAsync(MATERIAL_PREFIX, RECORD_COUNT); manager.Print(result); }
public async Task <IActionResult> GetMaterialsByPrefixWithSubTables() { try { const string MATERIAL_PREFIX = "11AKPAK"; const int RECORD_COUNT = 10; IMaterialManager manager = _serviceProvider.GetRequiredService <IMaterialManager>(); List <Material> result = await manager.GetMaterialsByPrefixWithSubTablesAsync(MATERIAL_PREFIX, RECORD_COUNT); return(View(result)); } catch (Exception e) { _logger.LogError(e, "GetMaterialsByPrefixWithSubTables Execution Error"); throw; } }