Sunday, 30 April 2017
Create a WCF service using the Entity Framework and consume after hosting it in IIS
----------------------------------------------------------------------------------------------------------------
Step1:Create table
USE [Chinna]
GO
/****** Object: Table [dbo].[Student] Script Date: 21-10-2014 12:06:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Student](
[id] [int] IDENTITY(1,1) NOT NULL,
[Name] [nvarchar](50) NULL,
[age] [int] NULL,
CONSTRAINT [stu_pk] PRIMARY KEY CLUSTERED
(
[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
----------------------------------------------------------------------------------------------------------------
Step1:Create table
USE [Chinna]
GO
/****** Object: Table [dbo].[Student] Script Date: 21-10-2014 12:06:31 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Student](
[id] [int] IDENTITY(1,1) NOT NULL,
[Name] [nvarchar](50) NULL,
[age] [int] NULL,
CONSTRAINT [stu_pk] PRIMARY KEY CLUSTERED
(
[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
Saturday, 29 April 2017
AngularJS Intellisense in Visual Studio 2012
AngularJS Intellisense in Visual Studio 2012
-----------------------------------------------------------
Lot of people facing same problem for to get Intellisense support for AngularJS in the Visual Studio HTML editor.
here are the steps
Step 1:
Find the file commonHTML5Types.xsd located in the Visual Studio install directory and back it up (just in case). Mine is here:C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Packages\schemas\html
Step 2:
Download this new version of commonHTML5Types.xsd and replace the existing one .
https://drive.google.com/file/d/0B8ObCj8_2eAmSmJjU3B6aUoxcUk/view?usp=sharing
Step 3:
Restart Visual Studio and that's it. You now have all the ng-* attributes available in Intellisense. This Works On My Machinetm, so please let me know if it works on yours too.
-----------------------------------------------------------
Lot of people facing same problem for to get Intellisense support for AngularJS in the Visual Studio HTML editor.
here are the steps
Step 1:
Find the file commonHTML5Types.xsd located in the Visual Studio install directory and back it up (just in case). Mine is here:C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Packages\schemas\html
Step 2:
Download this new version of commonHTML5Types.xsd and replace the existing one .
https://drive.google.com/file/d/0B8ObCj8_2eAmSmJjU3B6aUoxcUk/view?usp=sharing
Step 3:
Restart Visual Studio and that's it. You now have all the ng-* attributes available in Intellisense. This Works On My Machinetm, so please let me know if it works on yours too.
Saturday, 18 June 2016
Dynamically invoking a method with Reflection in .NET C# Without Constructor
var DLL = Assembly.LoadFile(@"C:\" + Component);
string className = DLL.GetName().Name + "." + Class;
var classInfo = DLL.GetType(className);
var methodInfo = classInfo.GetMethod(Function);
if (methodInfo != null)
{
object result = null;
ParameterInfo[] parameters = methodInfo.GetParameters();
object classInstance = Activator.CreateInstance(classInfo, null);
if (parameters.Length == 0)
{
result = methodInfo.Invoke(classInstance, null);
}
else
{
string[] split_Parameters = Parameters.Split(',');
object[] parametersArray = new object[split_Parameters.Count()];
for (int i = 0; i <= split_Parameters.Count() - 1; i++)
{
string type = (parameters[i]).ParameterType.Name.ToUpper();
switch (type)
{
case "INT32":
parametersArray[i] = Convert.ToInt32(split_Parameters[i]);
break;
case "INT":
parametersArray[i] = Convert.ToInt32(split_Parameters[i]);
break;
case "STRING":
parametersArray[i] = split_Parameters[i];
break;
case "BOOL":
parametersArray[i] = Convert.ToBoolean(split_Parameters[i]);
break;
default:
parametersArray[i] = split_Parameters[i];
break;
}
}
result = methodInfo.Invoke(classInstance, parametersArray);
actionResult.Status = "Success";
}
}
string className = DLL.GetName().Name + "." + Class;
var classInfo = DLL.GetType(className);
var methodInfo = classInfo.GetMethod(Function);
if (methodInfo != null)
{
object result = null;
ParameterInfo[] parameters = methodInfo.GetParameters();
object classInstance = Activator.CreateInstance(classInfo, null);
if (parameters.Length == 0)
{
result = methodInfo.Invoke(classInstance, null);
}
else
{
string[] split_Parameters = Parameters.Split(',');
object[] parametersArray = new object[split_Parameters.Count()];
for (int i = 0; i <= split_Parameters.Count() - 1; i++)
{
string type = (parameters[i]).ParameterType.Name.ToUpper();
switch (type)
{
case "INT32":
parametersArray[i] = Convert.ToInt32(split_Parameters[i]);
break;
case "INT":
parametersArray[i] = Convert.ToInt32(split_Parameters[i]);
break;
case "STRING":
parametersArray[i] = split_Parameters[i];
break;
case "BOOL":
parametersArray[i] = Convert.ToBoolean(split_Parameters[i]);
break;
default:
parametersArray[i] = split_Parameters[i];
break;
}
}
result = methodInfo.Invoke(classInstance, parametersArray);
actionResult.Status = "Success";
}
}
Saturday, 21 February 2015
Windows Communication Foundation (Code named
Indigo) is a programming platform and runtime system for building, configuring
and deploying network-distributed services. It is the latest service oriented
technology; Interoperability is the fundamental characteristics of WCF. It is
unified programming model provided in .Net Framework 3.0. WCF is a combined
features of Web Service, Remoting, MSMQ and COM+. WCF provides a common
platform for all .NET communication.
Friday, 7 November 2014
Extension Methods
Extension Methods:
------------------------
-It is one of the best approach to extend the functionalities of a class other than inheritance.
-Using this approach u can add new methods under an existing class even if u dont have permission to make changes on the class or the source code of the class is not available.
------------------------
-It is one of the best approach to extend the functionalities of a class other than inheritance.
-Using this approach u can add new methods under an existing class even if u dont have permission to make changes on the class or the source code of the class is not available.
Exceptions & Exception Handling
Exceptions & Exception Handling:
--------------------------------------------
-Generally under every program we will be comming across errors which are of 2 types:
-Compile Time Errors
-Run Time Errors
-A compile time error occurs due to the syntactical mistake that occurs in a program, these are not considered to be dangerous.
--------------------------------------------
-Generally under every program we will be comming across errors which are of 2 types:
-Compile Time Errors
-Run Time Errors
-A compile time error occurs due to the syntactical mistake that occurs in a program, these are not considered to be dangerous.
Assemblies in C#.net
Assemblies:
----------------
-An Assembly is a unit of file that contains the IL Code corresponding to a project when it was compiled.
-The name of an assembly will be same as the project from which it was created.
-Assemblies are known as units of deployment because once the application development is completed what we install on the clients machines is the assemblies only.
----------------
-An Assembly is a unit of file that contains the IL Code corresponding to a project when it was compiled.
-The name of an assembly will be same as the project from which it was created.
-Assemblies are known as units of deployment because once the application development is completed what we install on the clients machines is the assemblies only.
Abstract Classes in c#.net
Abstract Classes:
----------------------
-A class which contains any abstract methods in it is known as an abstract class.
What is an Abstract Method ?
---------------------------------------
Ans: A method which doesn't contain any method body to it is known as an abstract method.
-An abstract method should be declared with the "abstract" modifier.
eg: public abstract void Add();
----------------------
-A class which contains any abstract methods in it is known as an abstract class.
What is an Abstract Method ?
---------------------------------------
Ans: A method which doesn't contain any method body to it is known as an abstract method.
-An abstract method should be declared with the "abstract" modifier.
eg: public abstract void Add();
LINQ
1. Creates a class DataContext referring to the Database under which the table is present.
eg: CSharp7DataContext
2. Creates a seperate class referring to each table that is placed on the OR-Designer. The name of the class will be same as the table name.
eg: Emp or Students
eg: CSharp7DataContext
2. Creates a seperate class referring to each table that is placed on the OR-Designer. The name of the class will be same as the table name.
eg: Emp or Students
NESS TECHNOLOGIES INTERVIEW QUESTIONS
NESS TECHNOLOGIES INTERVIEW QUESTIONS
· Difference between private, public and protected fields.
· Restrict setting a property in another assembly.
· Is it mandatory to override a virtual method?
· Overriding scenario
· Difference between private, public and protected fields.
· Restrict setting a property in another assembly.
· Is it mandatory to override a virtual method?
· Overriding scenario
Subscribe to:
Posts (Atom)
Type Script variables
Difference between var,let and const in java script and typescript -----------------------------------------------------------------------...
-
Name - Chinnababu ore Working - Thomson reuters international services pvt ltd Location - Bengalore
-
AngularJS Intellisense in Visual Studio 2012 ----------------------------------------------------------- Lot of people facing same probl...