You've seen this! Your customer will see too. Buy this place

Database Initialization Strategies in EF 6 Code-First

1 1 1 1 1 Database Initialization Strategies in EF 6 Code-First5.00Rating 5.00 (1 Vote)

If you need to create database for your EF6 application you will need to think about initialization strategy. How to ensure the correct initialization of the database for the first time and also ensure it will not be re-created second time onwards? How to ensure it won't create a new database every time the ASP.NET Core application run? How can we deploy one database for a debug environment and another database for production environment? Entity Framework Does provide several strategies for database creation. They are called the database initialization strategies.

Read more: Database Initialization Strategies in EF 6 Code-First

What is Universal Windows Platform?

1 1 1 1 1 What is Universal Windows Platform?5.00Rating 5.00 (1 Vote)

The UWP (Universal Windows Platform) is a unified platform for building and running apps on Windows 10 and Windows 10 Mobile.

UWP is the evolution of earlier technologies. So, with the release of Windows 8, a new architectural platform for applications was introduced - Windows Runtime (WinRT), which allowed running applications in the so-called Modern (Metro) mode on desktops and tablets. Then, with the release of Windows 8.1 and Windows Phone 8.1, this technology was developed - there were "universal applications" that could run immediately Windows 8.1 and WP8.1. And in July 2015, the new Windows 10 OS was officially released. It uses the UWP platform, which is an evolution of the Windows Runtime.

As the name of the platform suggests, it is universal - universal for all devices in the Windows 10 ecosystem. And these are ordinary destops, tablets, mobile devices, IoT (Internet of Things) devices, Xbox, Surface Hub devices. And a UWP app can work the same on all of these platforms as long as they have Windows 10 installed.

Read more: What is Universal Windows Platform?

Using Ninject in C# ASP.NET MVC5 Projects

1 1 1 1 1 Using Ninject in C# ASP.NET MVC5 Projects5.00Rating 5.00 (1 Vote)

The IoC containers are used for dependency injection. There are many IoC containers, we use Ninject, as it is easy to use and understand. You can install the required package via NuGet. The package is called Ninject.MVC5

After installing the package, we can already use Ninject in the project. For example, let's change the constructor of the controller as follows:


using Ninject;
//.....................
public class HomeController : Controller
{
    IRepository repo;
    public HomeController()
    {
        IKernel ninjectKernel = new StandardKernel();
        ninjectKernel.Bind<IRepository>().To<BookRepository>();
        repo = ninjectKernel.Get<IRepository>();
 
    }
    public ActionResult Index()
    {
        return View(repo.List());
    }
}

Read more: Using Ninject in C# ASP.NET MVC5 Projects

Saturday the 8th.