Giter VIP home page Giter VIP logo

Comments (4)

DanieleSky avatar DanieleSky commented on June 9, 2024

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.

maccurt avatar maccurt commented on June 9, 2024

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.

DanieleSky avatar DanieleSky commented on June 9, 2024

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.

maccurt avatar maccurt commented on June 9, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.