Materials were refactored

This commit is contained in:
Evgeny Redikultsev
2023-06-18 12:22:29 +05:00
parent 5a9ced0870
commit 816c4a112b
50 changed files with 914 additions and 339 deletions

View File

@@ -0,0 +1,22 @@
using StructureHelperCommon.Infrastructures.Settings;
using StructureHelperCommon.Models.Codes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StructureHelperCommon.Models.Materials.Libraries
{
public class MaterialRepository : IMaterialRepository
{
public List<ILibMaterialEntity> Repository { get; }
public MaterialRepository(IEnumerable<ICodeEntity> codes)
{
Repository = LibMaterialFactory.GetLibMaterials()
.Where(x => codes.Contains(x.Code))
.ToList();
}
}
}