We have a class that wraps a MathNet.Numerics matrix:
public class Matrix
{
public MathNet.Numerics.LinearAlgebra.Matrix<double> _matrix { get; set; }
public int? DatabaseId { get; set; }
// ...
}
We need to store this Matrix
in the database using Entity Framework. Entity Framework is presently ignoring this property. I'm using Fluent API mapping and currently have this set up:
modelBuilder.Entity<Matrix>()
.HasKey(matrix => matrix.DatabaseId);
How can I use Entity Framework to persist my Math.Net Numerics Matrix wrapper in the database, including the _matrix
property? What should the table structure be? (I'm using Npgsql so I have to build the tables myself.) Thanks in advance.