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

Wednesday, 16 December 2015

CRUD operations,login and registration con



Hellow Friends,
                                Now I am going to describe  how to create your Simple Register form, Login form and How to make CRUD Operation which is very interesting concept  in asp.net using C# with mvc4 platform .It is very intresting concept in mvc.So Please Follow the steps.
Step-1
First create a table in your sql server database(suppose table name is userinfo) like this:
Step-2
Create a store procedure which name is sp_insertpro:

create Procedure sp_insertpro
(
@name varchar(50)=null,
@emailid varchar(50)=null,
@password varchar(50)=null,
@age varchar(50)=null,
@address varchar(50)=null
)
AS
Begin
set nocount on

begin
      Insert Into userinfo(Name,emailid,password,Address) values(@name,@emailid,@password, @address)
end
End

Tuesday, 15 December 2015

Reverse a string using recursion


 Hellow Friends,
                                Now I am going to describe  how to reverse a string with using  recursion function.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace recersfunction
{
    class recursionstring
    {
   public void reversestring(string str)
  {
    if(str.Length > 0) 
      reversestring(str.Substring(1, str.Length-1));
    else 
     return;
  }
}

Friday, 11 December 2015

CRUD operation ,login and registration in asp.net using c# with mvc4 platform



Hellow Friends,
                                Now I am going to describe  how to create your Simple Register form, Login form and How to make CRUD Operation which is very interesting concept  in asp.net using C# with mvc4 platform .It is very intresting concept in mvc.So Please Follow the steps.
Step-1
First create a table in your sql server database(suppose table name is userinfo) like this:

Step-2
Create a store procedure which name is sp_insertpro:

create Procedure sp_insertpro
(
@userid int,
@name varchar(50)=null,
@emailid varchar(50)=null,
@password varchar(50)=null,

@age varchar(50)=null,
@address varchar(50)=null
)
AS
Begin
set nocount on

begin
      Insert Into userinfo(Name,emailid,password,Address) values(@name,@emailid,@password, @address)
end
End

Tuesday, 8 December 2015

CRUD Operation in Asp.net in C# using store procedure in 6 steps:-



Hello Friends,
                      In this Chapter we will discuss about CRUD operations of  asp.net in c# using store procedure.

Step-1
Create a table like below (suppose table name is emp):
Step-2
Write the following code to create a store procedure for CRUD operation:
CREATE PROCEDURE dbo.gridoperate
       @qtype varchar(10),
       @id int=null,
       @name varchar(50)=null,
       @ads varchar(50)=null
AS
begin
SET NOCOUNT ON
--select
if (@qtype ='select')
begin
select id,name,ads from emp
end
--insert
if(@qtype ='insert')
begin
insert into emp(name,ads)values(@name,@ads)
end
--update
if(@qtype ='update')
begin
update emp set name=@name,ads=@ads where id=@id
end
--delete
if(@qtype ='delete')
begin
delete from emp where id=@id
end
end