Wpis z mikrobloga

@angular: ja nigdy nic nie robiłem w ASP.NET, ale... na 99% to nie jest to samo. Zapewne "Add" to metoda/funkcja(?) która dodaje coś tam, a "State" to właściwość(?), która ma większe znaczenie informacyjne, czyli "if ...State == EntityState.Added then ...".
To tylko przypuszczenia... xD
@5z7k9:
A new entity can be added to the context by calling the Add method on DbSet. This puts the entity into the Added state, meaning that it will be inserted into the database the next time that SaveChanges is called. For example:

using (var context = new BloggingContext())
{
var blog = new Blog { Name = "ADO.NET Blog" };
context.Blogs.Add(blog);
context.SaveChanges();
}
Another way to add a new entity
@angular: a, no to może macie jakieś eventy w ASP'ie(czyli automatycznie .Add() przy zmianie .State, ale to i tak trochę bez sensu), nie wiem. A dlaczego ktoś robi jedno i drugie jeżeli oznacza to samo to już kompletnie nie mam pojęcia.