I think I know why it happens what you see.
First your original code:
PersonelEntity personel = new PersonelEntity();
personel.IsNew = false;
personel.Serviskod = "1001";
personel.Fields["Id"].ForcedCurrentValueWrite(323);
personel.AdSoyad = "ARZU"; // String
personel.Tckimlikno = null; // Decimal? nullable
personel.IsBaslangic=null; // DateTime? nullable
personel.SetNewFieldValue("PersonelEkipId", null); // Decimal?
personel.Save();
You set IsNew to false immediately after the constructor call. This means that the entity logic itself now thinks it's a fetched entity. HOWEVER, the fields are all null (as it's a new entity!)
So, you then set fields to null:
personel.Tckimlikno = null; // Decimal? nullable
personel.IsBaslangic=null; // DateTime? nullable
however as these fields are already null, and the db value of the field is also null (as it's not set due to a fetch), this has no effect, the IsChanged flag of the fields stays false.
If you move the IsNew setting to right before the Save call, it will work, because the entity then thinks it's new, so it will change the fields' IsChanged flags to true.
it's a bit of a problem, as the entity doesn't take into account YOU set IsNew to false or a fetch routine, as it can't know who called IsNew's setter.
So the routine:
PersonelEntity personel = new PersonelEntity();
personel.Serviskod = "1001";
personel.Fields["Id"].ForcedCurrentValueWrite(323);
personel.AdSoyad = "ARZU"; // String
personel.Tckimlikno = null; // Decimal? nullable
personel.IsBaslangic=null; // DateTime? nullable
personel.SetNewFieldValue("PersonelEkipId", null); // Decimal?
personel.IsNew = false;
personel.Save();
should work. You can also change the SetNewFieldValue call to PersonelEkipId=null;
A bugfix on 17-mar-2007 (see changelog viewer in the customer area) causes this as you made advantage of a bug
->
Fixed an issue with fields which are null and which are set again to null, this would succeed, making the field dirty, which shouldn't be the case.
Fields which are null in a non-new entity which are set to null again shouldn't be marked as changed as they haven't changed at all (they were already null).