corexit: microsoft’s new cross platform framework
TRANSCRIPT
COREXITBy Sayedur Rahman
Principal Software Engineer
Microsoft Frameworks
.Net
.Net
ASP.NET
ASP.NET
Entity Framework
Entity Framework
What kind of name is that ???
A referendum
A vote in which everyone of voting age can take partwas held on Thursday 23 June, to decide whether the UK should leave or remain in the European Union.
A separation?
Why this separation?
EF CORE
ASP.NET CORE !!!
ASP.NET CORE !!!
EF CORE !!!!
EF CORE !!!!
ASP.NET Core Demo - Identity
ASP.NET Core Demo - Identity Inside Start up class
Method: ConfigureServices
Method: Configure
Run
app.UseIdentity();
ASP.NET Core Demo - Identity
ASP.NET Core Demo - Identity Inject following class by building DI
UserManager<ApplicationUser> _userManager; SignInManager<ApplicationUser> _signInManager;
Use following methods _userManager.CreateAsync _signInManager.SignInAsync _signInManager.PasswordSignInAsync _signInManager.SignOutAsync
EF Core Demo Install EF core from NuGet
Create a new class and inherit it from DBContext Class Over write method OnConfiguring Builder.UseSqlServer(“ConectionString”); Point out POCO model
DbSet<Blog> Blogs { get; set; }
PM> Install-Package Microsoft.EntityFrameworkCore.SqlServer
EF Core Demo Define Blog class public class Blog { public int BlogId { get; set; } public string Url { get; set; }
public List<Post> Posts { get; set; } }
EF Core Demo Query
using (var db = new BloggingContext()){ var blogs = db.Blogs .Where(b => b.Rating > 3) .OrderBy(b => b.Url) .ToList();}
EF Core Demo Save
using (var db = new BloggingContext()){ var blog = new Blog { Url = "http://sample.com" }; db.Blogs.Add(blog); db.SaveChanges();}
FYI
https://www.microsoft.com/net/core/platform