I compared the CS file generated by Visual Metal with my Linq CS files
for SQL Server, and noticed the property set function is different.
When I use VS to trace into the function, I can see the value is
properly set, and the function this.SendPropertyChanged("BirthDay") is
also called. The VS2008 however didn't "see" the two lines for
OnBirthDayChanging() and OnBirthDayChanged(). It won't let me set a
breakpoint on them, when stepping through, it simply skips these two
function calls. Any ideas?
[Column(Storage="_BirthDay", Name="BirthDay", DbType="int
unsigned", CanBeNull=true)]
[DebuggerNonUserCode()]
public uint BirthDay
{
get
{
return this._BirthDay;
}
set
{
if (_BirthDay != value)
{
this.OnBirthDayChanging(value);
this._BirthDay = value;
this.SendPropertyChanged("BirthDay");
this.OnBirthDayChanged();
}
}
}
On Aug 10, 11:59 am, Yi <
yic...@gmail.com> wrote:
> I took a look at changeset and you are right, no changes were tracked,
> all three change types are valued 0. From the debugger I can see the
> object returned from the query is correct and also i changed the value
> in the object correctly, why the changes were not tracked? Please
> help!
>
> On Aug 5, 3:06 pm, "Pascal Craponne" <
pic...@gmail.com> wrote:
>
> > This won't help, but theupdateshould work.
> > When a request returns an entity, it is already attached, so you don't need
> > to attach it anymore.
>
> > Can you tell if a SQL command is sent to MySQL? Can you take a look at the
> > changeset (GetChangeSet) after the changes and before the submitchanges?
>
> > On Sat, Aug 2, 2008 at 21:07, Yi <
yic...@gmail.com> wrote:
>
> > > Another thing I tried is using Attach method. When I use the Attach
> > > method with one parameter, I got the error "duplicated key", when I
> > > use the Attach with two parameters, I got a DBLinq error "method not
> > > implemented".
>
> > > I would appreciate any ideas and suggestions!
>
> > > On Aug 2, 12:04 pm, Yi <
yic...@gmail.com> wrote:
> > > > Hi, I have some trouble updating data using DbLinq and MySQL. My
> > > > updates looks like this:
>
> > > > Profile p = DataContext.Profiles.First( r => r.username == username);
> > > > p.LastUpdated = DateTime.Now;
> > > > DataContext.SubmitChanges();
>
> > > > My application didn't fail and didn't give any error message, but the
> > > > data in the table was not updated. I used the sameupdatesolution in