Author Archives: ooberoi

Data Seeding in EF Core

Data seeding is a process where you populate the initial set of data into the database. I’ll explain some of the rudimentary steps needed for creating seed data in your app. Prior to EF Core 2.1, seeding data was not … Continue reading

Posted in .NET, ORM | Leave a comment

How to create an .EXE using .NET Core Console App

In the previous exercise, we learnt how to publish and execute a .NET Core Console App! In case you want to review that exercise, you can access it from here. In this exercise, we’ll look at a quick way to … Continue reading

Posted in .NET | Comments Off on How to create an .EXE using .NET Core Console App

How to Publish and Execute a .NET Core Console App!

Publishing a .NET Core app is as easy as 1,2,3. Here’s how: After you have created the console app, make sure you select Release from the Solution Configurations drop-down menu. ¬† Now right-click on the project node inside Solution Explorer … Continue reading

Posted in .NET | Tagged , | Comments Off on How to Publish and Execute a .NET Core Console App!

How to use .NET Core Console app?

Console apps have been around since .NET’s inception i.e. 2002. Over the years, it has had a bit of a windows dressing with additional APIs, integration with .NET Core and the like. Let’s look at a simple console app written … Continue reading

Posted in .NET | Comments Off on How to use .NET Core Console app?

How to combine multiple stored procedures into a single resulset

Let’s say, you have multiple stored procedures each of which is tied to a partial view or View Component in MVC. Now, while this may seem like a logical thing to do, but what if you want the entire payload … Continue reading

Posted in SQL Server | Comments Off on How to combine multiple stored procedures into a single resulset

How to pass delimited list to a Stored Procedure

Let’s write a Table-valued function below. This can be created by navigating to Functions – Table-Valued Functions inside SQL Management Studio. Just an FYI, I am using the AdventureWorks database, but this¬† sample can be used in any situation. CREATE … Continue reading

Posted in SQL Server | Comments Off on How to pass delimited list to a Stored Procedure

Global Query Filters in EF Core 2.0

Global Query Filters are a new addition to the arsenal of features in EF Core 2.0. This also implies that EF core team spearheaded by Diego Vega who are working diligently to bring EF Core at par with its Entity … Continue reading

Posted in ORM | Comments Off on Global Query Filters in EF Core 2.0

Difference between Varchar and Nvarchar. When to use what?

This post was replaced by an erroneous content by an intruder…I will have re-write it. The inconvenience is regretted my dear lovely readers!

Posted in SQL Server | Leave a comment

EF Core 2.1 Roadmap

EF Core has had a makeover and continues to add new features to its arsenal. If you have already skipped EF Core 1.0, you might want to take a look at EF Core 2.0 and see what it has to … Continue reading

Posted in ORM | Comments Off on EF Core 2.1 Roadmap

Write a program that prints an average temperatue that is close to Zero

The idea is to get the lowest number that is close to the value zero (irrespective of the negative or positive value) from an array of average temperatures that are supplied like so: { 7, 7.9, 10.5, -4, 3, -6, … Continue reading

Posted in Algorithms & Data Structures | Comments Off on Write a program that prints an average temperatue that is close to Zero