Speed Test for Entity Framework (EF) Bulk Insert ( EF AddRabge VS EF Utility VS EF Extension)

Bulk Insert Speed Test In this post, we will discuss the bulk insert using Entity Framework (EF) in ASP.Net. we are going to compare three approaches using Entity Framework: EF AddRange(), EF Utility (https://github.com/MikaelEliasson/EntityFramework.Utilities) and EF Extension from http://entityframework-extensions.net/. Since EF Extension is not open source and owned by a company, I just show my result using its trial version and don’t want to make any troubles with that company. Maybe I made some mistakes in my coding or setting, you may using its trail

Continue Reading

IdentityServer4 Protecting an API using Passwords

1. About this Post In this post on IdentityServer4, we will continue our study from my last post “Creating ASP.NET Core Identity Using IdentityServer4 Visual Studio 2017” and the IdentityServer4 official documentation. We are going to discuss using user passwords with IdentityServer4. We are going to discuss using user passwords with IdentityServer4 based on our existing projects from my last post. You can find the solution source at my Github Repository. 2. Modify Identity Server Application Before modifying our code, let’s

Continue Reading

搭建ASP.NET Core Identity API 安全登入 基于 IdentityServer4 Visual Studio 2017

关于本文 在这篇文章中,我们会介绍对 IdentityServer4 的使用,以及如何与 ASP.NET Core 相关联,搭建安全的API对话。官方的文档在这里可以浏览 http://docs.identityserver.io/en/release/quickstarts/0_overview.html. 官方的很详细,但略过了一些细节和代码。 这里,针对官网文档的不足,我在这里展示了如果利用IdentityServer4构建安全对话。为了更好地理解IdentityServer,建议读者在阅读本文的同时可以参照官网文档。 如果你拿本文与官网文档作对比,请将本文作为官网的补充,而不是一个替代。我也是参照官网去完成一个个步骤的。你可以去我的Github下载源代码 Github Repository “.Net_Core_IdentityServer4_Connection_Starter” . 由于时间有限以及VS的语言版本,恕不能把我的这篇文章尽数翻译,请各位中文读者见谅。 [crayon-5dadb7913633d195429889/] 1.Big Picture for Our Demo Before our journey to use Identity with ASP.Net Core, I wish you gain a big picture about the oauth 2.0. You could get more information from here at http://docs.identityserver.io/en/release/intro/big_picture.html#. In this demo, we will create 3 projects : App Server, API Server and Client App. We could consider App Server as Facebook Server, API Server as a mobile game server, and the Client App as

Continue Reading

.Net Core Project Building in VSTS & TFS 2015/2017 (Error MSB4041 Solution)

In this post, we will try using new Visual Studio Team Services(VSTS) or Team Foundation Server(TFS) to build our .Net Core Console project. If you get the Error “error MSB4041: The default XML namespace of the project must be the MSBuild XML namespace. please go to the 4. Run Build in TFS” below directly to get the solution. VSTS is a service from Microsoft, offering the similar support from TFS. Therefore, you can enjoy almost the same services and functions

Continue Reading

从Visual Studio 2017 “Server Explorer” 获取数据库 连接信息字符串 ConnectionString

一般情况下,程序员需要手动编写ConnectionString。在这里,我们引入一种从Visual Studion获取连接信息的方法。这样子我们就可以从IDE里得到数据库或者文件的连接信息字符串 由于我的Visual Studion是英文版,有些插图和按钮无法进行翻译,请见谅。为了文档的正确性,我保留了英文的说明和步骤截图。希望可以得到您的体谅。 To get the connection string, we need to add the database in our Server Explorer. Click “View” in the Visual Studio main menu, then click the “Server Explorer”. Now, right click the “Data Connections”, choose “Add Connections”. Then you can specify the data source type you want. Just like the pop up below. In my case, it is just my local SQL Server, I choose “Microsoft SQL Server”. After choosing the data source type, you may

Continue Reading

Data Binding and Form Submission with .Net Core MVC Visual Studio 2017

Currently, Microsoft have release its Core 1.1 and we are sure there will be more supports in Core and related libraries. Maybe there have been newer versions when you read my post. In this post, we will discuss how to create a simple register form submission with Model and View data binding. To building this demo, this post from Ed Andersen gives me a lot help, if you have any question about data binding in .Net MVC, that blog will certainly help you.

Continue Reading

Site Footer