Here is my code first:
DbHw10Ent de = new DbHw10Ent();
Sales1 sal = new Sales1();
sal.SalesAmount = 6900;
sal.SalesDate = DateTime.Now;
sal.TaxAmount = 100.00M;
de.Sales1.Add(sal);
de.SaveChanges();
var sales = de.Sales1;
foreach (var o in sales)
{
Console.WriteLine("{0}--{1}--{2}--{3}", o.SalesID, o.SalesDate.ToShortDateString(), o.SalesAmount, o.TaxAmount);
}
Console.ReadLine();
Take note that it displays in the console but when I try to refresh my tables in the object explorer, nothing changes and when I close my solution, everything resets back to normal. Am I missing something here?
NOTE: It seems that The updated database stays in the DEBUG folder in the bin/. What will I do to be able to update the database in the databse explorer as well!