public bool Delete(MaterialType entity)
        {
            var materialType = _materialTypes.FirstOrDefault(e => e.ID == entity.ID);
            if (materialType == null) return false;

            _materialTypes.Remove(materialType);
            return true;
        }
        public MaterialType Insert(MaterialType entity)
        {
            if (GetById(entity.ID) != null) return null;

            var id = _materialTypes.Max(e => e.ID);
            var materialType = new MaterialType(id, entity.Name);
            _materialTypes.Add(materialType);

            return materialType;
        }
 public bool Delete(MaterialType entity)
 {
     return _contextMaterialType.Delete(entity);
 }
 public MaterialType Insert(MaterialType entity)
 {
     return _contextMaterialType.Insert(entity);
 }
 public bool Update(MaterialType entity)
 {
     return _contextMaterialType.Update(entity);
 }