I am running the following code:
if(ven.Source == null)ven.Source = new Source();
ven.name = (string) venue.Element("venueName");
Console.WriteLine("Venue Name: " + ven.name);
ven.Source.companyId = 1;
ven.Source.sourceReference = (string)venue.Attribute("venueID");
I am running through the same xml file each time and the (string)venue.Attribute("venueID");
is exacly the same each time, so why does a database update get run on save changes? Why does the company id not get set, but the source reference does? :
exec sp_executesql N'UPDATE [dbo].[Source]
SET [sourceReference] = @p3
WHERE ([sourceId] = @p0) AND ([companyId] = @p1) AND ([sourceReference] = @p2)',N'@p0 int,@p1 int,@p2 nchar(12),@p3 nchar(12)',@p0=71,@p1=1,@p2=N'x1830wa ',@p3=N'x1830wa '