I successfully created database on my local server using Code First, migrated it to Azure and now I want to connect to that database with using Azure connection string and my existing POCO clases.
My connection string:
<add name="CijenolomciContext" connectionString="Data Source=*.database.windows.net;Initial Catalog=NewCijenolomci;Persist Security Info=True;User ID=Bip*;Password=**;MultipleActiveResultSets=False"" providerName="System.Data.EntityClient" />
but this section of code happens to do nothing on the server:
Item i = new Item();
i.Name = "Cranberry";
i.OldPrice = new decimal(25.99);
i.NewPrice = new decimal(14.99);
i.SaleStarts = DateTime.Parse("2012-01-21");
i.CategoryID = 1;
context.Items.Add(i);
context.SaveChanges();
How to succesfully add it?
EDIT: This approach happens to modify my local DB, not the Server one.