This article is all about the key features introduced in the Beta release of Entity Framework 6.
IntroductionIn this article I provide some exciting and useful features of Entity Framework 6 beta release. Currently EF 6's beta release is available. The Beta release can be downloaded from NuGet. These features will be really useful and when the final release is available you will really find them useful and more powerful than the previous versions. So without wasting time I will proceed to discussing some key features.
privatestatic void SaveInput(string question,string answer)
{
using (var ctx = new AnswersContext())
ctx.Questions.Add(new Question()
Content = question,
Answers =new List<Answer> { new Answer { Content = answer } }
});
ctx.SaveChanges();
}
b. With Asynchronous Patterns
privatestatic void PrintQuestions()
foreach (var q in ctx.Questions)
Console.WriteLine(q.Content);
foreach (var a in q.Answers)
Console.WriteLine(" -" + a.Content);
As you can see, I have used async and await, two new keywords. If we are using the await operator then it is necessary to use async with the method signature. Since we are calling the ToListAsync method, as soon as this method is called, the thread won't block until the task finishes.
mBuilder .Entity<Users>() .MapToStoredProcedures(s => {
s.Update(u => u.HasName("modify_User"));
s.Delete(d => d.HasName("delete_User"));
s.Insert(i => i.HasName("insert_User"));
SummaryIn this article I have discussed some key features that have been introduced in the Beta release of Entity Framework 6 . There are many other features also introduced in EF 6. For more information you can refer to the following Codeplex website. Referenceshttp://entityframework.codeplex.com/
Active Directory feb3