GetWithChildren method usage help needed.
Issue #73
closed
Hello all,
I have these two table below. Could somebody please post the code to retrieve the data from both the tables based on the Date property in the Schedule Class. I know that it is by using the GetWithChildren method, but unfortunately it is not pulling the right records from the Punches class. I am trying to get all the records on a single date from both the tables. So for asking too much, If possible could you please add codes for InsertWithChildren & UpdateWithChildren. Thanks in Advance!
public class Schedule
{
[PrimaryKey, AutoIncrement]
public int Id { get; set; }
public DateTime Date { get; set; }
public DateTime ShiftStart { get; set; }
public DateTime ShiftEnd { get; set; }
public string ShiftNotes { get; set; }
public string Company { get; set; }
public string Color { get; set; }
public string Visibility { get; set; }
[OneToMany(CascadeOperations = CascadeOperation.All)]
public List<Punches> Punches { get; set; }
}
public class Punches
{
[PrimaryKey, AutoIncrement]
public int Id { get; set; }
[ForeignKey(typeof(Schedule))]
public int ScheduleID { get; set; }
public DateTime Date { get; set; }
public DateTime Time { get; set; }
public string Mode { get; set; }
}
Comments (2)
-
-
- changed status to closed
Not an issue
- Log in to comment
You have plenty of samples in the IntegrationTests project that comes with the project. Can you show your code so we can diagnose your issue?