Does DapperExtensions nuget package support writing complex objects in SQLite?

22 Views Asked by At

I am using DapperExtensions nuget package to read/write data to SQLite for below classes.

 public class ProjectDto
 {
     public Guid? Id { get; set; }
     public string Name { get; set; }
     public ItemDto WorkItem { get; set; }
 }

 public class ItemDto
 {
     public int Id { get; set; }
     public string Name { get; set; }

 }

I want to write ProjectDto to Project table and ItemDto to Item table. How to establish the relationship such that while inserting ProjectDto, data is written to Item table as well?

Here is the code to Insert via DapperExtensions:

 using (IDbConnection connection = new SqliteConnection(ConnectionString))
 {
     _ = await connection.InsertAsync(entityToInsert);
 }
0

There are 0 best solutions below