Monday, April 13, 2020

ASP.NET CORE 3.1 Tutorials with Example demos


Steps of Development using ASP.NET CORE  MVC  3.1

1. Web API using asp.net core 3.1
2. MVC - Application using asp.net core 3.1 
3. Web Application using Razor and asp.net core 3.1






Saturday, April 11, 2020

What is WPF . ? How to create WPF application step by step


What is WPF . ? How to create WPF application step by step

Step 1 – WPF UserControl Class Library 

Code Download





Step 2 – Create WPF Project for implement task using WPF UserControl Class library







Step 3 – Adding User Control




Step 4 –



Step 5



Task 1:

Create a UserControl called LoginPasswordUserControl. The LoginPasswordUserControl

contains a Label (loginLabel) that displays the string "Login:", a TextBox (loginTextBox) where the user inputs a login name, a Label (passwordLabel) that displays the string "Password:" and finally, a TextBox (passwordTextBox) where a user inputs a password.

<UserControl x:Class="Lab4.LoginPasswordUserControl"

xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:Lab4"

mc:Ignorable="d"

d:DesignHeight="450" d:DesignWidth="800">

<Grid>

<TextBox HorizontalAlignment="Left" Height="26" Margin="228,164,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="407"/>

<Label Content="UserName" Name="loginLabel" HorizontalAlignment="Left" Margin="145,164,0,0" VerticalAlignment="Top" Width="78"/>

<TextBox HorizontalAlignment="Left" Name="loginTextBox" Height="26" Margin="228,211,0,0" TextWrapping="Wrap" Text="TextBox" VerticalAlignment="Top" Width="407"/>

<Label Content="Password" Name="passwordLabel" HorizontalAlignment="Left" Margin="145,211,0,0" VerticalAlignment="Top"/>

<Button Content="Login" Name="passwordTextBox" HorizontalAlignment="Left" Margin="384,300,0,0" VerticalAlignment="Top" Width="251" RenderTransformOrigin="1.002,0.246" Height="34"/>

</Grid>
</UserControl>

Task 2:

LoginPasswordUserControl must provide Public read-only properties Login and Password that allow an application to retrieve the user input from loginTextBox and passwordTextBox.

Make sure that both of the control’s properties are exposed to the developer’s form, i.e., the form that hosts the composite control LoginPasswordUserControl.





Task 3:

Use the composite control in a Windows application that will have a button (OK) and a label as shown below. Write code necessary to display the login and password entered by the user on the form. Run the program and click the OK button to display the information entered.




Task 4: Include data validation code as required.





using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace Lab4
{
/// <summary>

/// Interaction logic for LoginPasswordUserControl.xaml

/// </summary>

public partial class LoginPasswordUserControl : UserControl
{
public LoginPasswordUserControl()
{
InitializeComponent();
}
public string loginUsrename { get; set; }
public string loginpassword { get; set; }
private void OkLogin_Click(object sender, RoutedEventArgs e)
{
string loginusrename = UsernameTextBox.Text;
string loginpass = loginTextBox.Text;
if (loginusrename == "")
{
Requiredfieldloginusenrmae.Content = "loginusrename required *";
}
if (loginpass == "")
{
Requiredfieldpassword.Content = " loginpass required *";

}
MessageBox1.Content = loginusrename + " " + loginpass;

}
}
}

Friday, April 10, 2020

What is umbraco and different versions


Umbraco is an open-source content management system (CMS) platform for publishing content on the World Wide Web and intranets. It is written in C# and deployed on Microsoft based infrastructure. Since version 4.5, the whole system has been available under an MIT License.

How do I know my Umbraco version?
Many CMS's have an icon you can click somewhere in the back-office that tells you which version you're running so that you can see whether you need to apply any security patches, or are falling behind on upgrades etc.


Umbraco 7.14
       The latest version of Umbraco 7 is Umbraco 7.14.

What is JWT , please explain with Examples.


What is JWT , please explain with Examples.
Answers :-
Authorize with JWT in ASP.NET Core 3.1 Web API. ASP.NET Core 3.1 provides native support that allows you to authorize endpoints using JSON web Tokens (JWT) i.e. without any dependency on third party packages. You may need additional config such as Issuer and Audience addresses if you wish to validate those
Examples
----------------------------------------------------------
Asp.net core 3.0 Web Api token based authentication example using JWT in VS 2019
----------------------------------------------------------
 In this tutorial we are going to cover web api token based authentication example using JWT in asp.net core 3.0with vs 2019
We will build it from scratch step by step
1. First we need to developer web api project , and then we will implement Microsoft Identity and then finally we will impement token based authentication using JWT in asp.net core 3.0 web API application.

Conditions
----------------------------------------------------------
We before go create WEB API token based authentication
we need to install following tools
----------------------------------------------------------
1. VS 2019
2. .NET Core 3.0
3. Postman
4. Sql Server
----------------------------------------------------------
How to implement token based authentication (JWT) in asp.net core 3.1 web api.?
----------------------------------------------------------
Lets start implement web api token based authentication example using asp.net core 3.0


Step#1
How How to create asp.net core 3.0 web api using VS2019

Step#2
How to setup Database and implement Microsoft Identity in asp.net core 3.1 Web API Project
In this steop we will setup database in aps.net core 3.1 web api project, so go to project folder structure and then open appsettings.json file and then set connection string as per the syntax see the below example

-         Now need to install Entity Framework Core Package 3.1
-         


What is symptoms coronavirus


COVID-19 symptoms range from mild to severe. It takes 2-14 days after exposure for symptoms to develop. Symptoms may include:

fever
cough
shortness of breath

Those with weakened immune systems may develop more serious symptoms, like pneumonia or bronchitis. You may never develop symptoms after being exposed to COVID-19. So far, most confirmed cases are in adults, but some children have been infected. There is no evidence that children are at greater risk for getting the virus.

Thursday, April 9, 2020

What is Awareness for COVID-19



STAY AT HOME - FOLLOW PRECAUTIONS



Add caption

What is Health is Wealth . ?

Health is the Biggest Wealth in Life. It brings in desired Happiness, Enjoyment and Pleasure.

Given things in life are priceless and can’t be purchased with money. There is a strong perspective that, unless a person is Healthy, it’s difficult for him/ her to enjoy. Money doesn’t have a value unless it is really enjoyed. Simply the Possessions of money/ things don’t make an individual Rich, It is the Good Health.

This implies that Health strongly influences a person’s capability to enjoy the Wealth which he might have amassed.

Wednesday, April 8, 2020

How to set connection To SQLite Database Using Node.js

How to set connection To SQLite Database Using Node.js

Need to follow steps : -

Summary: in this tutorial, you will learn how to connect to an SQLite database from Node.js applications.
Installing sqlite3 module

To interact with the SQLite database, you need to download and install sqlite3 module. You can use npm to do so using the following command:

npm install sqlite3

After installing the sqlite3 module, you are ready to connect to a SQLite database from a Node.js application.

To connect to an SQLite database, you need to:
First, import the sqlite3 module
Second, call the Database() function of the sqlite3 module and pass the database

Top Keyword searching on google and its important for learning

***KEYWORDS ***
expressjs
nodejs
mongodb
MongoDB university node js
w3schools
 axios
npm install mongodb
nodejs mysql install mongodb ubuntu robomongo crud meaning mongodb nodejs mongodb query laravel mongodb mongodb find mongodb documentation mongoose npm mongodb create database studio 3t install mongodb ubuntu 18.04 docker mongodb install mongodb windows python mongodb jquery npm robo3t django mongodb npm express php mongodb lodash npm npm firebase bcrypt npm npm mongodb npm meaning express npm docker nodejs mongo database nodejs github install mongodb mac docker node moment npm mongodb windows node postgres jwt npm node cron node npm mongodb docs mongodb ubuntu start mongodb mongodb create collection bcrypt nodejs mongoose js mongodb w3schools react node js crud php mysql npm moment mongo express npm bcrypt mongodb version mongoengine node js examples mongodb insert nodejs w3school mongochef pm2 npm node mon mongodb driver start mongodb ubuntu firebase nodejs mongodb and mongodb pricing mongoosejs node js for beginners nodejs send email nodejs jwt nodejs docs install mongodb windows 10 npm ci node js developer redis npm node app xlsx npm express ejs angular node crud database node js website heroku nodejs mongoose create studio 3t license key react node nodejs tutorialspoint npm windows MongoDB nosql npm redis mongodb java mongodb install ubuntu 18.04 node js android install mongodb linux install mongodb ubuntu 16.04 redux npm mongoose db nodejs sqlite

Tuesday, April 7, 2020

Free Unlimited Hosting for asp.net C# , asp.net core 1.1 to 3.1 with blazor and also for PHP support for different version


Superior ASP.NET Hosting Professional ASP.NET hosting with unlimited space and bandwidth and email. 60 Days Free Trial Instant Activations & Free Temporary URL No Credit Card Required! US & Europe Datacenter

 

Sunday, April 5, 2020

How to connect to a Sqlite Database using .Net Core

Steps for connection to a SqlLite using .Net Core

Requirements

In order to follow along with this post, you will need:

1) .Net Core SDK (version 3.1.0 used here, but example should work for any version if you adjust the dependency versions accordingly).

2) Any text editor, but Visual Studio Code is highly recommended.

1. Create New Project

Since the purpose of this post is just to illustrate a basic connection to Sqlite, we will be using a simple console application. Using either Windows Powershell or Linux/Mac terminal:mkdir sqlite_app cd sqlite_app dotnet new console code .
Copy

The last command (code .) will open the project in Visual Studio Code, assuming you are currently inside the project's directory.

2. Update the .csproj File

You should have two files inside your project: 

sqlite_app.csproj and Program.cs. 

 Open the sqlite_app.csproj and add the required Entity Framework dependencies. 
 Your files should look as follows:
<Project Sdk="Microsoft.NET.Sdk">
 <PropertyGroup> <OutputType>Exe</OutputType> <TargetFramework>netcoreapp3.1</TargetFramework> 
 </PropertyGroup> <ItemGroup> <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.0" /> </ItemGroup> </Project>
Copy
Go back to the terminal and restore the project by using the command below. Restoring the project will fetch our newly added NuGet dependencies.dotnet restore
Copy

3. Update the 

Program.cs 

using System;
using Microsoft.Data.Sqlite; 
 namespace sqlite_app
 {

 class Program
 { 
 static void Main(string[] args) 
 { 
 var connectionStringBuilder = new SqliteConnectionStringBuilder(); //Use DB in project directory. 
If it does not exist, create it: connectionStringBuilder.DataSource = "./SqliteDB.db"; using (var connection = new SqliteConnection(connectionStringBuilder.ConnectionString)) 
{
 connection.Open(); //Create a table (drop if already exists first): var delTableCmd = connection.CreateCommand(); 
 delTableCmd.CommandText = "DROP TABLE IF EXISTS favorite_beers"; 
 delTableCmd.ExecuteNonQuery();
 var createTableCmd = connection.CreateCommand();
 createTableCmd.CommandText = "CREATE TABLE favorite_beers(name VARCHAR(50))"; createTableCmd.ExecuteNonQuery(); //Seed some data: using (var transaction = connection.BeginTransaction()) 
 { 
 var insertCmd = connection.CreateCommand();
 insertCmd.CommandText = "INSERT INTO favorite_beers VALUES('LAGUNITAS IPA')"; insertCmd.ExecuteNonQuery(); 
 insertCmd.CommandText = "INSERT INTO favorite_beers VALUES('JAI ALAI IPA')"; insertCmd.ExecuteNonQuery();
 insertCmd.CommandText = "INSERT INTO favorite_beers VALUES('RANGER IPA')"; insertCmd.ExecuteNonQuery();
 transaction.Commit(); 

 } //Read the newly inserted data: var selectCmd = connection.CreateCommand(); selectCmd.CommandText = "SELECT name FROM favorite_beers"; 
 using (var reader = selectCmd.ExecuteReader()) 
 {
 while (reader.Read()) { var message = reader.GetString(0); Console.WriteLine(message); 
 } 
 }
 }
 } 
 } 
}
Copy

4. Run Project

Go back to the terminal and run:dotnet run
Copy


You should see the list of three beers print on your command line terminal:LAGUNITAS IPA JAI ALAI IPA RANGER IPA

VueJs - Introduction


Vue is a JavaScript framework for building user interfaces. Its core part is focused mainly on the view layer and it is very easy to understand. The version of Vue that we are going to use in this tutorial is 2.0.

As Vue is basically built for frontend development, we are going to deal with a lot of HTML, JavaScript and CSS files in the upcoming chapters. To understand the details, let us start with a simple example.
In this example, we are going to use the development version of vuejs.
Demo

<html> 
 <head>
 <title>VueJs Introduction</title>
 <script type = "text/javascript" src = "js/vue.js"></script>
 </head> 
 <body> 
 <div id = "intro" style = "text-align:center;"> 
 <h1>{{ message }}</h1> 
 </div> 
 <script type = "text/javascript"> var vue_det = new Vue({ el: '#intro', data: { message: 'My first VueJS Task' } }); </script> 
 </body> 
</html>








Friday, April 3, 2020

C# Programming Features & Programs

C# Programming Features & Programs

What is SOLID Design Principles

Design Principles are the design principles that are basically used to manage most of the software design problems that can be encountered in our day to day programming. these design principal are provided with some mechanism that will make the soft designs more understandable flexible and maintainable

What is the main reason behind of the UN successful and successful application it's related to to design principles

the following are the main reasons for most of the software failure

1. putting more functionality on classes in the simple word of word lot of functionalities we are putting into the class even though they are not related to the class

2. implementing tightly Cup tight coupling between the classes if the classes Siddique up dependent on each other then a change in one class will affect the other class also

How to overcome this an successful application development problems

we need to use the correct architecture isolated example MVC layered 3 layer and MVP and so on as per the project requirements that stop important because architecture if you are a using right architecture so so it will be better for application and we can reduce faillur chance of application
is it developer we need to follow the design principles for example solid principles
again we need to choose the correct design patterns as per the project requirement that is main points if you follow so definitely we will achieve good results

introduction two SOLID design principles in C sharp programming language.

this solid design principles are basically used to manage most of the software design problems that generally as is the developer we face in our day to day programming solid principle represent 5 design principles that basically used to make the software design understandable flexible in maintainable

SOLID Acronym


1.S stands for single responsibility principle which is also known as SRP
2. O stands for the the open close principles which is also known as OSP
3. l stands for lisko substitution Principle Which is also known as a recipe
4. I I stand for the interface segregation principle which is also known as
5. D stands for dependency inversion principle which is also known as DP

what are the advantages of using solid design principle
we will get the following advantages of using solid ( single responsibility principle, open closed principle, lisko of substitution principle,interface segregation principle, dependency inversion principal) design principles in sisa
What are the advantages of using SOLID design principles . ?
will get the following advantages of using the solid design principles in C#
  1. reduction in complexity of the code
  2. increase readability extensibility and maintain maintenance
  3. reduce error and implement reachability
  4. achieve better testability
  5. reduce tight coupling

Sql Server

Sql Server

WEB API

WEB API 

What are the features provided by the asp.net Core . ?

the following are the Core features that are provided by the asp.net Core
built-in support For the dependency injection
built-in supports for the logging framework and it can be extensible
introduced new faster cross-platform web server Castrol soe application can run without ISI Apache and NGINX

Multiple hosting ways are supported
it supports modularity so the developer needs to introduce the module model required by the application however it core Framework is also supported provide providing the matter package that includes the libraries
command-line supports to create build and run the application
there is no web.com fix file we can store the custom configuration into an S3 EP app settings dot JSON file
there is no Global dot S5 we can now register and use the services into startup class
it is good to support for asynchronous programming
support WebSocket and signalR
provide protection against CS RF cross-site request forgery

What are the advantages of ASP.NET core over ASP.NET.?

there are following advantages of ASP.NET core over asp.net it is cross platform so it can be run on Windows Linux and Mac
there is no dependency on Framework installation because all the required dependencies are ship with our application
asp.net core can handle more request than the ASP.NET
multiple deployment options available within asp.net Core

What is WEB API . ?

The term API stands for Application Programming Interface. ASP.NET Web API is a framework that makes it easy to build Web API’s, i.e. HTTP based services on top of the .NET Framework. ASP.NET Web API is an ideal platform for building Restful services. These services can then be consumed by a broad range of clients like Browsers Mobile applications Desktop applications IOTs

Wednesday, April 1, 2020

What is asp.net core and history of asp.net core with a different version

What is asp.net core and history of asp.net core with a different version


Asp.net Core is not an  updated version of ASP.NET,  asp.net Core is completely rewriting that work with Dotnet core Framework it is much faster country configurable modular scalable extensible and cross-platform support it can work with both dot net Core and Dot Net Framework what the dot net standard Framework is best suitable for developing cloud-based such as web application mobile application and IoT applications  this is a new framework of dot net technology this is completely new and Mini new features provided in this framework and multi supported multi-platform supported like Mac OS Linux Windows absolutely weekend we can Host on different platforms this is a completely new framework and the new platform is not an announcement or upgraded version of ASP.NET Framework this is a completely new framework







Top 10 ASP.NET MVC Interview Q & A

1. What is ASP.NET MVC ?

ASP.NET MVC is a web application framework. it is lightweight and highly testable framework. MVC separate application into three components- Model, View and Controller.

2. Can you explain Model, View and Controller in MVC ?

Model - its business entity and it is used to represent the application data.
Controller - request sent by the user always scatters through controller and its responsibility is to redirect to the specific view using View() method.
View- if the presentation layer of MVC.

3. Explain the new features added in version 4 of MVC( MVC4) ?

following features added newly-
Asynchronous controller task support
building the JavaScript.
segregating the config for MVC routing, Web API, Bundle etc.
mobile templates.
added ASP.NET Web API template for creating REST based services.
Bundling the JavaScript .

4. Can you explain the page life cycle of MVC ?

below are the process followed in the sequence -
App initialisation
Routing
Instantiate and execute controller
Locate and invoke controller action
Instantiate and render view 

5. what are the advantages of MVC over ASP.NET ?

Provides a clean separation of concerns among UI ( Presentation layer), model ( Transfer objects / Domain objects/ Entities) and Business logic ( Controller).
Easy to UNIT test.
improved reusability of model and views. we can have multiple views which can point to the same model and vice versa .
improved structuring of the code.

6. what is separation of concerns in ASP.NET MVC?

it's the process of breaking the program into various resident features which overlaps in functionality as little as possible. MVC pattern concerns on separating the content from presentation and data processing from content.

7. what is Razor View Engine ?

Razor is the first major update to render HTML in MVC 3. razor was designed specifically for view engine syntax. main purpose of this would be to simplify and code for girls templating for HTML generation. below is the sample of using razor:
@model MvcMusicStore.Models.Customer

@{ViewBag.Title = “Get Customers”;}

<div class=”cust”> <h3><em>@Model.CustomerName</em> </h3>

8. What is the meaning of Unobtrusive JavaScript ?

this is a General term that conveys general philosophy, similar to the term REST ( Representational State Transfer) . Unobtrusive JavaScript code in your page markup.

Example: instead of using events like onclick and onsubmit, Unobtrusive JavaScript attaches to Elements by their ID or class based on the HTML5 data attributes. in a line

9. what is the use of ViewModel in MVC ?

ViewModel is a plane class with properties, which is used to bind it too strongly typed view. ViewModel can have the validation rules defined for its properties using the data annotations.

10. what do you mean by Routing in MVC ?

routing is a pattern matching mechanism of incoming request to the URL pattern which are registered in route table. Class- “URLRoutingModule” is used for the same process.

11. What are actions in MVC ?


Actions are the methods in controller class which is responsible for returning the view or JSON data. action will mainly have return type - “ActionResult” and it will be in work from method - “InvokeAction” called by the controller.

Top 10 Interview Questions & Answers of ASP.Net C#

What is ASP.NET?


ASP.NET was developed in that response to the problems that developers have with classic ASP. since it is in such widely used, Microsoft ensures that SP script executes without modification on a machine with the Dot Net Framework( The ASP engine, ASP.DLL, Is not modified when installing the Dot Net Framework). Thus, IIS can house both ASP and ASP.NET scripts on the same machine.

Advantages of ASP.NET:

Separation of God from HTML: To make a clean sweep, with ASP.NET you have the ability to completely separate layout and business logic. This makes it much easier for teams of programmers and designers to collaborate efficiently.
Support for compiled languages: developer can use VB.NET and access features such a strong typing and object-oriented programming. Using compiled languages also means that ASP.NET pages do not suffer the performance penalties associated with interpreted code. ASP.NET Pages are precompiled to bytecode and Just In Time (JIT) compiled when first requested. The subsequent request is directed to the fully compiled code which is cached under the source changes.
Use services provided by the .Net Framework: The .NET Framework provides a class library that can be used by your application. Some up the classes help you with input/ output, assist operating system services, data access or even debugging.
Graphical Development Environment: Visual Studio .NET provides a very rich development environment for web developers. You can drag and drop controls and their properties the way you do in Visual Basic 6 and you have full IntelliSense support, not only for your code but also for HTML and XML.
State management: To refer to the problems mentioned before, ASP.NET provides a solution for session and application state management. The state information can, for example, be kept in memory of stored in the database. It can be shared across web forms, and state information can be recovered even if the server fails or the connection breaks down.

ASP.NET overview

Here are some points that give a quick overview of ASP.NET:
ASP.NET provides services to allow the creation, deploy, and execute application and Web Services.
Like ASP, ASP.NET is a server-side technology.
Web applications are built using web forms. ASP.NET comes with built-in web form controls, which are responsible for generating the user interface. The mirror typical HTML widgets like text boxes or buttons. If these controls do not fit your needs, you are free to create your own user controls.
Web forms are designed to make building web-based applications as easy as building Visual Basic applications.

2. What are the different validators in ASP.NET?


ASP.NET validation controls define an important role in validating the user input data. Whenever you will give the input, it must always be validated before sending it across to various layers of an application.If we get the user input with validation, then chances are that we are sending the wrong data. So, meditation is a good idea to do whenever we are taking input from the user.

There are the following two types of validation in ASP.NET:
Client-Side Validation
Server-Side Validation
Client-Side Validation: When validation is done on the client Browser, then it is known as Client-Side Validation. We use JavaScript to do the Client-Side Validation.

Server-Side Validation: When Validation occurs on the server, then it is known as Server-Side Validation. It is a secure form of validation. The main advantage of Server Side Validation is if the user somehow bypasses the client-side validation we can still catch the problem on the server-side.

The following are the validation controls in ASP.NET:
RequiredFieldValidator control
CompareValidator control
RangeValidator control
RegularExpressionValidator control
CustomFieldValidator control
ValidationSummary

3. What is View State?


View State is the method To preserve the value of the page and control between round trips. It is a Page-Level state management technique. View State is turned on by default and normally serializes the data in every control on the page regardless of whether it is actually used during a post-back.

A web application is stateless. It means that a new instance of a page is created every time when we make a request to the server to get the page and after the round trip our page has been lost immediately.

Features of View State:
There are a few features of view state:
Returns the value of the Control after postback without using a session.
Stores the value of Pages and Control properties defined in the page.

Create a custom view state provider that lets you store view state information in a SQL Server Database or in another data store.

Advantages of ViewState:


Easy to implement.
No server resources are required: The view state is contained in a structure within the page load.
And has a security feature: It can be encoded uncompressed or Unicode implementation.

Rewrite whole Web Site System and Sub System with data migration to new system.

Can you please share me your skype id or whats up number for better communications  my skype id is - jitendra.tech  whats up - +919617741414...