Comments (4)
Hi,
with versione 2.3.2 I haven't issue.
public class EntitaMap : DommelEntityMap<EntitaEntity>
{
public EntitaMap()
{
ToTable("tppEntita");
Map(u => u.Id).ToColumn("IDEntita").IsKey().IsIdentity();
Map(u => u.Descrizione).ToColumn("DSEntita");
Map(u => u.IdOwner).ToColumn("IDOwner");
}
}
this is my test
using (var uow = UnitOfWorkFactory.GetUnitOfWork())
{
var entita1 = uow.Entita.Repository.Get(e => e.Id == 1).First();
entita1.Descrizione = "TEST";
uow.Entita.Repository.Update(entita1);
}
and the Update implementation
public void Update(TEntity entity)
{
Connection.Update(entity: entity, transaction: Transaction);
}
2021-08-06 15:26:55,362 [4] INFO string - Selected SQL Builder 'SqlServerSqlBuilder' for connection type 'SqlConnection'
2021-08-06 15:26:55,400 [4] INFO string - Resolved table name '[tppEntita]' for 'Dinamo.DataAccess.DINAMO.Entita.EntitaEntity'
2021-08-06 15:26:55,402 [4] INFO string - Selected SQL Builder 'SqlServerSqlBuilder' for connection type 'SqlConnection'
2021-08-06 15:26:57,628 [4] INFO string - Resolved column name '[IDEntita]' for 'Int32 Id'
2021-08-06 15:26:59,002 [4] INFO string - Select<EntitaEntity>: select * from [tppEntita] where ([IDEntita] = @p1)
2021-08-06 15:27:02,650 [4] INFO string - Selected SQL Builder 'SqlServerSqlBuilder' for connection type 'SqlConnection'
2021-08-06 15:27:02,650 [4] INFO string - Resolved table name '[tppEntita]' for 'Dinamo.DataAccess.DINAMO.Entita.EntitaEntity'
2021-08-06 15:27:02,657 [4] INFO string - Resolved property 'Id' as key property for 'Dinamo.DataAccess.DINAMO.Entita.EntitaEntity'
2021-08-06 15:27:03,619 [4] INFO string - Resolved column name '[IdInsieme]' for 'Dinamo.DataAccess.DINAMO.Insiemi IdInsieme'
2021-08-06 15:27:04,785 [4] INFO string - Resolved column name '[DSEntita]' for 'System.String Descrizione'
2021-08-06 15:27:05,865 [4] INFO string - Resolved column name '[Annullato]' for 'Boolean Annullato'
2021-08-06 15:27:06,662 [4] INFO string - Resolved column name '[IDOwner]' for 'Int32 IdOwner'
2021-08-06 15:27:07,517 [4] INFO string - Resolved column name '[IDEntita]' for 'Int32 Id'
2021-08-06 15:27:14,175 [4] INFO string - Update<EntitaEntity>: update [tppEntita] set [IdInsieme] = @IdInsieme, [DSEntita] = @Descrizione, [Annullato] = @Annullato, [IDOwner] = @IdOwner where [IDEntita] = @Id
from dommel.
Interesting, mine does work. What are your Nuget Packages? Your connection.update, what is the extension package for that? I think mine is using .contrib but I did not pull that in, perhaps it is a dependency from some other nuget package
from dommel.
I've installed Dommel 2.3.2, Dapper.Contrib 2.0.78, Dapper.FluentMap.Dommel 2.0.0
My connection.Update refer a Dommel
from dommel.
Ok, I think I got some of it figured out... My .Update was going to the Dapper.Contrib, I then installed Dommel and made is use it's extension. Now I am getting a new error: System.ArgumentNullException: 'Value cannot be null. (Parameter 'source')' I will see if I can figure that out next, I think I am on the right track..
from dommel.
Related Issues (20)
- Missing single quotes around generated SQL HOT 3
- modulo in predicate is not working with sqlite connection HOT 1
- Advice for inserting object with One to One relation HOT 1
- DefaultTypeMap.MatchNamesWithUnderscores is not finding columns in snake case HOT 1
- DatabaseGeneratedOption.None not working HOT 4
- Combining predicate and One-to-many relations HOT 1
- SQLExpression does not use column mapping HOT 2
- Nuget 2.4.0 package issue HOT 2
- could you add a method to set the table name HOT 1
- missing selectAsync with joins HOT 1
- DateOnly and TimeOnly support HOT 2
- Not working with generic or abstract entity HOT 2
- SelectPaged and Multi Mapping HOT 1
- Issues resolving table names on derived types HOT 1
- Column Date in Postgres HOT 1
- Insert column with type of array HOT 1
- Automatic multi mapping N-hierarchy HOT 1
- One to Many Relation HOT 1
- Parentheses in SQL WHERE clause not working HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dommel.