Subsonic SimpleRepository アップロード イメージ
-
19-09-2019 - |
質問
私はもう何ヶ月も SimpleRepository を使用していますが、初めて画像/ドキュメントをアップロードしてデータベースに保存する必要があります
私のクラスは次のようになります。
public class Document: ObjectMetaData
{
public string FileName { get; set; }
public Guid UserId { get; set; }
public DocumentType DocumentType { get; set; }
public string DocumentLocation { get; set; }
public byte[] DocumentData { get; set; }
}
public enum DocumentType
{
EmploymentContractSigned = 1,
EmploymentContractUnSigned = 2
}
データをデータベースに永続化すると、サブソニックは「DocumentData」を無視するだけです
ファイルをデータベースに保存するにはどうすればよいですか?
- DocumentData = File.ReadAllBytes("somefile.doc")
解決
githubの上で答えを見つけることが、彼らはそれ以降のリリースの一つで、この問題を修正:ます。http:// github.com/inbox/555338#replyする
所属していません StackOverflow