Posts

Donate

Using Microsoft.Extensions.DependencyInjection In .NET 5 or .NET Core Console Application

Image
Team, Here's how to incorporate the Microsoft.Extensions.DependencyInjection namespace and it's ServiceProvider class in a .NET 5 or .NET Core Console Application project. If you're an ASP.NET Core MVC developer, you might recognize how it is applied in Startup.cs for Dependency Injection specifically ConfigureServices() method wherein the AddTransient() method is utilized to map an interface class and it's implementation type. To begin with, lets by creating a .NET 5 Console application project and follow the steps below. Project Setup 1. Add the Microsoft.Extensions.DependencyInjection package to your project via NuGet. 2. Create three folders, new classes and interfaces based from the image below. Models Add two model classes specifically Employee and Product with three properties for each class. Product.cs public class Product { public int ProductCode { get ; set ; } public string ProductName { get ; set ; } public double Prod

Sharkoon SKILLER SGS2 Gaming Chair Product Review

Image
Team, A week ago,I decided to purchase a gaming chair at a local computer shop in one of the malls here in Cebu since the piston of my old office chair does not work anymore. I did canvass at several stores but I'm not amazed by the brands that they were selling.While most of the chairs' upholstery that were presented to me were made of leather, the Sharkoon SKILLER SGS2 Gaming Seat was made of fabric and the price is just within my budget. That's why I decided to purchase this item. The main features of Sharkoon SKILLER SGS2 Gaming Chair based from the main website Sharkoon SKILLER SGS2 Gaming Chair are: A. Breathable and Supple - which describes the upholstery that is entirely made of soft fabric. B. Versatility through Adjustability - denotes the adjustable backrest, ergonomic posture, 3D armrest and seating height. C. Comfortable Extras - these extras include suspension and tilt control system, large 60 mm wheels and a backrest which can be reclined and locked

How To Persist Input Control Values In Bootstrap-Table On Paging, Filtering And Searching In ASP.NET MVC

Image
Team, When working with the Bootstrap-Table by Wenzhixin in a specific project, I encountered an issue which is the value of input controls such as checkbox and textbox were lost when I performed searching, filtering or pagination of the Bootstrap-Table. I tried several solutions presented in github and the documentation such as setting the properties of data-maintain-meta-data or data-maintain-selected to true and much more. After a few hours, I did found the solution in the documentation which is Saving Row Data Using Input . The solution is to fetch the current value of the control and call Bootstrap-Table updateRow method to preserve the values. The entire page is shown below including it's JavaScript code. @{ ViewBag.Title = "Home Page"; } <div class= "row" > <div id= "divPeople" class= "col-md-12" > <div class= "table-responsive" > <table id= "tblPeople"

How To Insert Or Add Emojis In Microsoft Teams Status Message

Image
Good day Gents! I was trying to update my Microsoft Teams status and was wondering if I can add or insert emoji. For editing or adding new teams status, only text fields are available and there's no emoji icon similar to writing a teams message. After googling for a few minutes, I found this link Emoji's in status which is a feature request in Microsoft Teams User's Voice Forum. So far this upgrade request only has thirty votes which is relatively small and may be considered a low priority for the product team to implement. Given the limitations at hand, I tried several approach including copying an emoji in a chat message which didn't work and later found a solution using Microsoft Outlook 365. First is to create a new email message in Microsoft Outlook and press (Window Key + .). The emoji dropdown control will appear. Next is to select the emoji that you wanted to add to Teams. Copy the emoji from the newly created email message template and paste that to Micr

.NET 5 - CA1416: This call site is reachable on all platforms. is only supported on Windows 7.0 and later

Image
Hi All, Our software architect just recently upgraded our custom class library that contains common data access classes, custom utilities and functions for our day to day tasks from .NET Framework 4.7x to .NET 5. Since we are only deploying our applications to windows users, he set the TargetFramework value to net5.0-windows in .csproj file. <Project Sdk= "Microsoft.NET.Sdk" > <PropertyGroup Label= "Globals" > <SccProjectName>SAK</SccProjectName> <SccProvider>SAK</SccProvider> <SccAuxPath>SAK</SccAuxPath> <SccLocalPath>SAK</SccLocalPath> </PropertyGroup> <PropertyGroup> <TargetFramework>net5.0-windows</TargetFramework> <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> <UseWPF>true</UseWPF> <PackageId>Utilities.XYZLibNET</PackageId> <Version>1.0.0.3</Version> <Authors>Development Te

How To Setup TP-Link Wi-Fi Range Extender TL-WA855RE With Your Wireless Modem Or Router

Image
Hello Gents! Just recently, our ISP replaced our modem with a new one due to internet outage issues that occured these past few weeks. Since the new router's coverage can't reach some parts of our house, I have to reconnect our TP-Link TL-WA855RE range extender device to this new Wi-Fi router or modem. The steps to setup are presented below below. 1. Connect the TP-Link extender to a laptop or desktop using a CAT5 Straight-Through cable. Reset the device by pressing the reset button using a small pin. Make sure that the device is powered on. 2. Open a browser and enter the following IP address: " http://192.168.0.25 4". When the create password screen appears, add a default password. This will open the home page of the repeater. 3. In Quick Setup tab, scan for the wireless devices available. Select your Wi-Fi SSID and enter the device's password. Click Next. 4. You may check the Hide SSID Broadcast checkbox or leave it as unchecked. Then click Next. 5. A s

WPF Custom DataGrid Vertical Scrolling Slow With Thousands Of Records

Image
Hello And Good Evening! I was tasked by our software architect to investigate an existing project of our company as to why a custom WPF DataGrid's vertical scrolling is slow, lagging or sluggish. This project will collect and show thousands of records that composed mostly hardware and software assets and it's related attributes. The DataGrid control used in the project is a custom class that inherits the DataGrid class with user-defined functions that performs specific tasks. public class clsCustomDataGrid : DataGrid { public clsCustomDataGrid() { //More codes here... } //More codes here... } We tried setting the virtualizations through the XAML but no luck. The scrolling is still lagging both using the mouse wheel and vertical scroll bar. After several attempts of researching through the forums and trying out the recommended answer, the solution that fixed the vertical scrolling issue is to set the virtualizations of the column, row, VirtualizingPanel a

Getting Started With Unity IoC Container Dependency Injection In .NET Core Using Entity Framework Core ORM And SQL Server

Image
Hello Fellow Programmers! Visual Basic Version: Using Unity IoC Container Dependency Injection, Dapper ORM and SQL Server In Visual Basic .NET Core Or .NET 5 Application In this article, I'll demonstrate on how to incorporate the Unity IoC Container into a .NET Core Console Application using Entity Framework Core ORM and SQL Server.This will apply the constructor injection methodology of dependency injection where in dependencies are provided through a constructor. I've used this IoC Container several years ago and have not done any coding after that. So it's time to revisit this terrific tool again and create a simple application that will retrieve a single record from Microsoft's sample database called ContosoRetailsDw . Make sure the DB is installed on your machine. Once done, we may now proceed in creating the sample program by performing the steps below. Project Setup 1. Start off by creating a .NET Core Console Application targetting the latest framework wh

Getting Started With ASP.NET Core 5.0 MVC Web Application Using Dapper ORM And SQL Server

Image
Hi All, In this tutorial, I will demonstrate on how to create an ASP.NET Core 5.0 MVC CRUD Web Application using Dapper ORM which is considered as the King of Micro ORM and an alternative to both Entity Framework and RepoDB ORM. I have published ASP.NET MVC and ASP.NET Webforms articles before using Dapper ORM in this blog and have used this ORM in an internal application before. With the birth of .NET Core framework, it's time to join the bandwagon of promoting these type of tools that helped maximize the productivity of the developers by creating articles as guide or reference. Enough with the chitchat and lets start coding. :-) I. Project Setup 1. Create a Customer table in a SQL Server database using the script below. USE [Your_Database] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO CREATE TABLE [dbo].[Customer]( [CustomerID] [numeric](18, 0) IDENTITY (1,1) NOT NULL , [CompanyName] [varchar](40) NULL , [Address] [varchar](35)

Donate