Monday, 16 December 2019

How to create Web Api Application with Sql Db connection using entity framework

Hello Friends,

         Now I am going to describe this article  how to create Web Api Application with Sql Db connection using entity framework.Before go to this concept ,we should know basic approach about entity framework and which approach has used in this application,Next Session i'll describe briefly about entity framework,Please go through this article .I hope it will be  very enjoy full for all of my friends.

Entity Framework : It is a open source ORM(Object Relational Mapping) framework for dot net application by Microsoft.This framework is very user friendly and helpful for dot net developer,Basically It has three approaches
1.Model First:
                  In Model First approach after creation of entity model then the database will be create by the option of "Generate database from Model" in entity model design screen.
2.Code First:
                 In Code First Approach first we will create the class then the database will create based on that class.
3.Schema First or Database First:
                 In this approach we will create the entity framework means the ".edmx" file and class file etc based on the existing database.
In this application i am using  "Schema First or Database First" approach

Please the follow below steps to create web api application:

Sunday, 8 December 2019

Create a Simple asp dot net core application in 10 Steps

Hello Friends,

         Now I am going to describe how to Create a Simple asp dot net core application in Ten Steps.Next Session will be discuss the web api application with db connection using entity framework .I hope it will be  helpful for all of my friends.

Step-1:Open Visual Studio ->Create New Project and select "Asp.net Core Web Application" ->Click on OK















Saturday, 30 November 2019

How Genarate GUID in Dot net application

Hello Friends,
         Now I am going to describe What is GUID and how to generate Custom GUID in .net using C#,I hope it will be  helpful for beginner.      

GUID: It is stands for Global Unique Identifier.It is 128-bit int(16 bytes).Dot net framework is used System.GUID class to represent the GUID by the help of Guid.NewGuid() method.

Console Application:

  • Create a console application ,write below code and press F5 to run this console application. 

using System;

namespace ConsoleApp1
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            Guid obj = Guid.NewGuid();
            Console.WriteLine("New Guid is :" + obj.ToString());
            Console.ReadLine();
        }
    }
}

OutPut:Press F5


New Guid is :ce21285a-61ff-4bb5-b006-6c0cf5287f28


In this session I’ve explained how to generate GUID in .net application. So after read please Comments and suggestions.Thanks & Regard
Rabi
























Saturday, 9 February 2019

Create The Simple WebAPI Application using C#.net in 7-Steps


Hello Friends,
 Now I am going to describe how to create Simple WebAPI Application in 7-Steps  without DB Connection using C#.net in Visual Studio 2017.After that We will discuss How to call this WebAPI in MVC application and  create WebAPI Application with DB Connection using 3-layer architecture,I hope it'll be  helpful for beginner, Please follow in below steps                                                                                            

Step:1
Open your Visual Studio go to File Menu and create New Project.










Wednesday, 9 August 2017

How to sort the name in alphabatically order using c#.net


Hello Friends,
           Now I am going to describe  how to sorting the different names in alphabetical order in c#.net.

Code of C#.net:
Simple create the console application and write this code:


class Program
    {
        static void Main(string[] args)
        {
            List<string> arr = new List<string>();
            {
                arr.Add("dotnet");
                arr.Add("java");
                arr.Add("angular");
                arr.Add("wcf");
                arr.Add("mvc");
                arr.Add("sql");
                arr.Sort();
                Console.WriteLine("Your sorted array is :");
                foreach (string sortarr in arr)
                Console.WriteLine(sortarr);
            }
            Console.ReadLine();
        }
    }
              I've explained how to sorting the different names in alphabetical order in c#.net.So after read please Comments and suggestions.

Thanks & Regard
Rabi

Sorting the names in alphabatical order without sort() of C#.net

Hello Friends,
           Now I am going to describe  how to sorting the different names in alphabetical order without using sort function of c#.net.

Code of C#.net:
Simple create the console application and write this code:

class Program
    {
        static void Main(string[] args)
        {
            string[] arr = new string[] { "dotnet", "java", "oracle", "angularjs","nodejs" ,"sql","mvc"};
            int count;
            count = arr.Length - 1;
            for (int i = 0; i < count; i++)
            {
                for (int k = count; k > i; k--)
                {
                    if (((IComparable)arr[k - 1]).CompareTo(arr[k]) > 0)
                    {
                        dynamic name = arr[k - 1];
                        arr[k - 1] = arr[k];
                        arr[k] = name;
                   
                    }
                }
            }
            Console.WriteLine("your sorted name is:");
            foreach (var item in arr)
            {
                Console.WriteLine(item);
            }
            Console.ReadLine();
        }
    }


 
             I've explained how to sorting the different names in alphabetical order without using builtin function of c#.net.So after read please Comments and suggestions.

Thanks & Regard
Rabi

 

Sunday, 27 December 2015

How to register with cascading drop down in mvc4

Hello Friends,
                                Now I am going to describe  how to create a Register form with Cascading Dropdown list and Login form using  MVC4 in C#. Follow the steps.
Step-1
First create a website File->New->Project->select Web from left side-> ASP.NET MVC 4 Web Application->Provide Name(Suppose mvcregistration_dropdown)->click on ->OK->Than Select a template->Internet Application->OK.

Step-2
create four tables,three tables(country,state,city) for dropdown bind and anather table(suppose- userinfo) for save like this: 
country :

state
 
city
 
userinfo