Navigate properties when using Dapper Extenstions

c# dapper

Question

Im using DapperExtensions library for simple CRUD operations. When I add a navigate property to my model, I get an error message that this column is not in the database. Can you in any way change this so that Dapper Extensions ignores this property?

Example of my model

public class Order : EntityBase
{
    public int OrderId { get; set; }
    public int MarketId { get; set; }
    public int ModelId { get; set; }
    public int ContactId { get; set; }
    public string Project { get; set; }
    public decimal Undertaking { get; set; }

    public virtual Model Model { get; set; }
    public virtual Contact Contact { get; set; }
}

Accepted Answer

Use the Write attribute above the property

[Write(false)]


Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why