Hello,
I'm using Subsonic (SimpleRepository) in my new project and enjoy using it but...
With one, and only one of my table, it does not create all the columns and i don't understand why.
Here is the code :
public class Rating
{
public Rating()
{
UsernameVotant = "";
UsernameEvaluate = "";
Note = 0.0;
NoteAccueil = 0.0;
NotePedagogie = 0.0;
NoteRapportQP = 0.0;
NoteContenu = 0.0;
Comment = "";
stageId = 0;
DateNote = DateTime.Now;
isValidate = false;
}
[SubSonicPrimaryKey]
public int ID { get; set; }
public DateTime DateNote;
public int stageId;
public string UsernameVotant;
public string UsernameEvaluate;
public int Note;
public int NoteAccueil;
public double NotePedagogie;
public double NoteRapportQP;
public double NoteContenu;
[SubSonicLongString]
public string Comment { get; set; }
public bool isValidate { get; set; }
}
Called like my other classes :
IRepository _repoRun = new SimpleRepository(Core.Config.ArticlesDB, SimpleRepositoryOptions.RunMigrations);
public bool AddRating(Rating p)
{
_repoRun.Add<Rating>(p);
return true;
}
The table Ratings created contains the columns : ID, Comment, isValidate
Whatever what I try to add as default value, the 3 columns contains the value : ID = 1 (2, 3, 4...) -> works Comment = "" isValidate = false
As i noticed a probleme where naming a column "Read", i tryed to rename the columns, rename the table (which was "Vote" [in french]) but the probleme is the same as with my original table "Votes"
Could you help me please.
Thanks in advance (and sorry for my english)