Dapper.Contrib [Write(false)] annotation is not working

0

I am using Dapper to work with my database in an asp.net core api. I am also using Dapper Contrib for annotations. I want to be able to ignore a property in my model with

[Write(false)]
public type name { get; set; }

But it is still trying to insert that property into the database. I have no idea why it is not working. I am working with a team and when I pull from our branch that code works, but when I create a property and add that annotation it doesn’t work. It is trying to insert that column to the database and I get an invalid column name exception. Help is very appreciated.

This is the error Message:

Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware[1]
Microsoft.Data.SqlClient.SqlException (0x80131904): Invalid column name ‘ColumnName’
c#
asp.net-core
dapper
dapper-contrib
asked on Stack Overflow Oct 20, 2020 by ILikeFritos • edited Oct 20, 2020 by ILikeFritos

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0