Skip to main content

Posts

How To Create Image Gallery in UWP Application

How to implement image gallery in gridview This article demonstrates how to make image gallery application using universal windows platform.  1. Let's start step by step. first of all open visual studio and create new blank UWP project as follows.     2. Click next and enter your project name and choose location where you want to save your project.   3. Click Create and choose target and minimum version that your UWP application will support.     4. Click Ok and your UWP project will created automatically and look like as following. 5. Now open MainPage.xaml file and enter below code between Grid tag. <NavigationView IsSettingsVisible= "False" IsBackButtonVisible= "Collapsed" > <NavigationView.MenuItems> <NavigationViewItem x:Name= "MenuImage" Tag= "image" Content= "Image Category" Icon= "Pictures" ></Navig

ASP.NET Core - Overview

What is ASP.NET Core? ASP.NET Core is a web framework created by Microsoft for building web applications, APIs, and microservices. It uses common patterns like MVC (Model-View-Controller), dependency injection, and a request pipeline comprised of middleware. It's open-source under the Apache 2.0 license, which means the source code is freely available, and the community is encouraged to contribute bug fixes and new features. ASP.NET Core runs on top of Microsoft's .NET runtime, similar to the Java Virtual Machine (JVM) or the Ruby interpreter. You can write ASP.NET Core applications in a number of languages (C#, Visual Basic, F#). C# is the most popular choice. You can build and run ASP.NET Core applications on Windows, Mac, and Linux. Why do we need another web framework? There are a lot of great web frameworks to choose from already: Node/Express, Spring, Ruby on Rails, Django, Laravel, and many more. What advantages does ASP.NET Core have?  Speed . ASP.NET Core is fast. Bec

How to backup database in sql server using query

This article demonstrates how to backup database from SQL server to disk using query. Let's start step by step. Open Microsoft SQL Server management studio and run following query. The following example backs up the complete TestDB database to disk. USE TestDB; GO BACKUP DATABASE TestDB TO DISK = 'c:\temp\TestDB.bak' WITH FORMAT, MEDIANAME = 'SQLServerBackups', NAME = 'Full Backup of TestDB'; GO   Full back up to disk as default location from SQL Server Management Studio In this example, the database Test will be backed up to disk at the default backup location. 1. The connect SQL server database engine instance in your machine. 2. Expand Databases , then right click on Test database, then select Tasks , then select Back Up . 3. Then click OK. 4. When the backup completes successfully, select OK to close dialog box.  

How To Import Data From Excel To SQL Table Using Query

This article demonstrates how to import the data from a Microsoft Excel sheet to a SQL Server table in Microsoft SQL Server. Let’s start step by step. Here I have one Excel sheet with employee details data with six columns as above and this detail I will use as an example and load into employee table.  Open SQL Server management studio and run following SQL query. DECLARE @Qry NVARCHAR(MAX) DECLARE @FilePath NVARCHAR(255)='D:\Employee.xlsx' EXEC sp_configure 'Show Advanced Options', 1; RECONFIGURE; EXEC sp_configure 'Ad Hoc Distributed Queries', 1; RECONFIGURE; SET @Qry='SELECT * FROM OPENROWSET(''Microsoft.ACE.OLEDB.12.0'', ''Excel 12.0; HDR=yes; Database='+CONVERT(NVARCHAR(255),@FilePath)+''', [Sheet1$]);' INSERT INTO Employees EXEC (@Qry) select * from Employees You have to make sure "Microsoft Access Database Engine Redistributable" is install or not in your local machine. If it is not

SQL Joins

A SQL JOIN is used to combine two or more tables, based on a related column between tables. Let's take a look selection from the "Orders" table: OrderId CustomerId OrderDate 1001 1 2020-05-22 1002 2 2020-05-22 1003 3 2020-05-22 Then, look at a selection from the "Customers" table: CustomerId CustomerName Country 1 John USA 2 Bill USA 3 Jimmy USA Now, the relationship between Orders table and Customers table is the "CustomerId" column. Then, we can create the following SQL statement that contains an INNER JOIN, It'll select records that have matching values in both tables: SELECT o.OrderId, c.CustomerName, o.OrderDate FROM Orders as o INNER JOIN Customers as c ON o.CustomerId=c.CustomerId and above SQL statement will produce following result like this: Orde

First C# Program

C# can be used in a window-based, web-based, or console application. To start with, we will create a console application to work with C#.  Open Visual Studio (2019 or later) installed on your local machine. Click on File -> New Project... as below       From the New Project popup, select C# in the language menu and select the Console App in the project type menu and click next.       In the name section, give any appropriate project name, a location where you want to create your project files.     Click next and select target framework.   Click Create to create the console application.   Program.cs will be created as default a C# file in Visual Studio where you can write your C# code in Program class, as shown above.   To see the output of the above C# program, we have to compile it and run it by pressing Ctrl + F5 or clicking the "HelloWorld" Run button.