I have a very simple table and I can happily query it using LINQ To SQL, but when I do any save/updates the GetChangeSet method on my datacontext is always empty.
My code is very simple (concatenated code from various classes):
public static EntitiesDataContext EntitiesContext
{
get { return new EntitiesDataContext("Data Source=ANTSLAPTOP\\sqlexpress;Initial Catalog=nmncouk_d000;Integrated Security=True"); }
}
public static void Save(Price price)
{
EntitiesContext.Prices.InsertOnSubmit(price);
EntitiesContext.SubmitChanges();
}
[Test]
public void SavePrice()
{
Price price = new Price();
price.Lower = 1;
price.Upper = 2;
price.PricePerDay = 10;
Price.Save(price);
Assert.AreNotEqual(price.PriceId, 0);
}