Persist the serialized artifact bytes under a name and return the storage file id to record on the model.
the serialized model artifact
a human-readable artifact name (e.g. model-<pipeline>-v<version>.bin)
OptionalcontextUser: UserInforequest user — required on the server for isolation/audit
the file id to store in MLModel.ArtifactFileID
The single coherent IArtifactStore: it creates a real
MJ: Filesrow (through the injected IEntityFactory, stamped with the active storageProviderID) AND persists the serialized artifact bytes to local disk at<baseDir>/<file.ID>.bin. It returns the real File row id soMLModel.ArtifactFileIDsatisfies its FK to__mj.File, and the matching LocalArtifactLoader reads the bytes back by that id.Why both halves: the FK forces a genuine File row id, but
MJ: Files.Save()only records the metadata row — it never moves bytes — so for this dev / on-prem mode we write the bytes ourselves, keyed by the File id. Production follow-up: swap the localwriteFilefor a real providerPutObject; the id contract is unchanged.