When we talk about .net 3.5 framework, LINQ is a major thing, In simple word linq is a orm.
1. LINQ to Object
Queries performed against the in-memory data
2. LINQ to ADO.Net [Example]
2.1 LINQ to SQL (formerly DLinq) {Queries performed against the relation database only Microsoft SQL Server Supported}
2.2 LINQ to DataSet {Supports queries by using ADO.NET data sets and data tables}
2.3 LINQ to Entities {Microsoft ORM solution}
3. LINQ to XML (formerly XLinq)
{ Queries performed against the XML source}
In my site i have put all examples of linq and its use.
http://etgconsultancy.com/DotNetFrameWork/Framework3p5/LINQ-Implementation.aspx
A Complete implementation of LINQ to SQL can be found here :
http://etgconsultancy.com/DotNetFrameWork/Framework3p5/Linq-to-Sql.aspx
Wednesday, September 30, 2009
Sunday, September 6, 2009
Implement google map, how to get coordinates
Here are the very simple steps to implement google map in your application..
I assume you have a gmail account, and you have created your mark on http://maps.google.com
So first make your google location.
Now generate your key for google map, if you dont have click on following url to generate key http://code.google.com/apis/maps/signup.html
once you get your key, replace the key in following script.
< script src="http://maps.google.com/maps?file=api&v=2&sensor=false&key=yourkey" type="text/javascript" >< / script >
< script type="text/javascript" >
function initialize() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("divMap"));
map.setCenter(new GLatLng(37.4419, -122.1419), 13);
map.setUIToDefault();
}
}
< / script >
Now place a div where you want to display the google map.
< div id="divMap" style="margin-top:12px;width:500px;height:400px;" >
< / div >
finally initialise the key
< script language="javascript" type="text/javascript" >
window.load= initialize();
< / script >
Google ma getting dipalyed on your site, but you might be wondering why your location not gettting displayed. For that you need to change the coorodinates.
How to get the coordinates ? Simply open your location in google map and copy paste the following javascript code on browser. youe get your location, replace the code in map.setCenter(new GLatLng(37.4419, -122.1419), 13); method in above script.
javascript:void(prompt('',gApplication.getMap().getCenter()));
Or
click on the right top "send" you get the following code
Hi, I'd like to share a Google Maps link with you.
Link: < http://maps.google.com/maps/ms?ie=UTF8&hl=en&msa=0&msid=103425934348104227970.000472c4205e6efea558c&ll=19.298314,72.861425&spn=0.007281,0.009624&z=17 >
Enjoy google map in your application.
Arindam
http://etgconsultancy.com
I assume you have a gmail account, and you have created your mark on http://maps.google.com
So first make your google location.
Now generate your key for google map, if you dont have click on following url to generate key http://code.google.com/apis/maps/signup.html
once you get your key, replace the key in following script.
< script src="http://maps.google.com/maps?file=api&v=2&sensor=false&key=yourkey" type="text/javascript" >< / script >
< script type="text/javascript" >
function initialize() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("divMap"));
map.setCenter(new GLatLng(37.4419, -122.1419), 13);
map.setUIToDefault();
}
}
< / script >
Now place a div where you want to display the google map.
< div id="divMap" style="margin-top:12px;width:500px;height:400px;" >
< / div >
finally initialise the key
< script language="javascript" type="text/javascript" >
window.load= initialize();
< / script >
Google ma getting dipalyed on your site, but you might be wondering why your location not gettting displayed. For that you need to change the coorodinates.
How to get the coordinates ? Simply open your location in google map and copy paste the following javascript code on browser. youe get your location, replace the code in map.setCenter(new GLatLng(37.4419, -122.1419), 13); method in above script.
javascript:void(prompt('',gApplication.getMap().getCenter()));
Or
click on the right top "send" you get the following code
Hi, I'd like to share a Google Maps link with you.
Link: < http://maps.google.com/maps/ms?ie=UTF8&hl=en&msa=0&msid=103425934348104227970.000472c4205e6efea558c&ll=19.298314,72.861425&spn=0.007281,0.009624&z=17 >
Enjoy google map in your application.
Arindam
http://etgconsultancy.com
Sunday, May 3, 2009
CLR, CTS and CLS JIT, MSIL Code
Common Language Runtime :
CLR is the core engine of .Net framework.

CLR provide the following services :
1. Memory management
2. Thread management
3. Exception handling
4. Garbage collection
5. Security
What is JIT ?
The Common Language Runtime (CLR) provides various Just In Time compilers (JIT) and each works on a different architecture depending on Operating System. That is why the same Microsoft Intermediate Language (MSIL) can be executed on different Operating Systems without rewrite the source code. Just In Time (JIT) compilation preserves memory and save time during application initialization. Just In Time (JIT) compilation is used to run at high speed, after an initial phase of slow interpretation. Just In Time Compiler (JIT) code generally offers far better performance than interpreters.
CLS (Common Language Specification):
CLS is a standard for .net . cls is small set of specification to make all languages as a .net compliant languages. cls make a use of cts and clr. if my languages (c#,vb.net,j#,vc++) wants to be compliant language it has to follow cls standard.
CTS (Common Type System):
Common Type System is also a standard like cls. If two languages (c# or vb.net or j# or vc++) wants to communicate with each other, they have to convert into some common type (i.e in clr common language runtime). In c# we use int which is converted to Int32 of CLR to communicate with vb.net which uses Integer or vice versa
CLR is the core engine of .Net framework.

CLR provide the following services :
1. Memory management
2. Thread management
3. Exception handling
4. Garbage collection
5. Security
What is JIT ?
The Common Language Runtime (CLR) provides various Just In Time compilers (JIT) and each works on a different architecture depending on Operating System. That is why the same Microsoft Intermediate Language (MSIL) can be executed on different Operating Systems without rewrite the source code. Just In Time (JIT) compilation preserves memory and save time during application initialization. Just In Time (JIT) compilation is used to run at high speed, after an initial phase of slow interpretation. Just In Time Compiler (JIT) code generally offers far better performance than interpreters.
CLS (Common Language Specification):
CLS is a standard for .net . cls is small set of specification to make all languages as a .net compliant languages. cls make a use of cts and clr. if my languages (c#,vb.net,j#,vc++) wants to be compliant language it has to follow cls standard.
CTS (Common Type System):
Common Type System is also a standard like cls. If two languages (c# or vb.net or j# or vc++) wants to communicate with each other, they have to convert into some common type (i.e in clr common language runtime). In c# we use int which is converted to Int32 of CLR to communicate with vb.net which uses Integer or vice versa
Thursday, April 2, 2009
Role Based Security Implementation in AspNet
http://www.asp.net/security/tutorials/role-based-authorization-cs
http://www.codeguru.com/csharp/.net/net_security/authentication/article.php/c7415 [zip file at the end of the file.]
Setting in web.config
=====================
< connectionStrings>
< add name="myDbConnection" connectionString ="Server=43.455.565.67;database=mydatabasename;uid=arindam;pwd=passmenow;" />
< /connectionStrings>
< roleManager enabled="true" defaultProvider="SqlRoleManager" >
< providers>
< add name="SqlRoleManager" type="System.Web.Security.SqlRoleProvider" connectionStringName="myDbConnection" applicationName="MyApplication" />
< /providers>
< /roleManager>
Create the following set of tables to support the role based authorization and security system.
Ceate table User
(
UserID - pk
Username varchar(20),
Password varchar(20)
)
Ceate table SecurityGroupAssigns
(
AssignID - pk
UserID - fk
SecurityGroupId - fk
)
Ceate table SecurityGroup
(
SecurityGroupId - pk
Name
DisplayName
)
Create Table SecurityRightAssign
(
AssignID - PK
SecurityGroupId - fk
SecurityRightID - fk
)
Create Table SecurityRight
(
SecurityRightID - PK
SecurityRight - varchar
)
http://www.codeguru.com/csharp/.net/net_security/authentication/article.php/c7415 [zip file at the end of the file.]
Setting in web.config
=====================
< connectionStrings>
< add name="myDbConnection" connectionString ="Server=43.455.565.67;database=mydatabasename;uid=arindam;pwd=passmenow;" />
< /connectionStrings>
< roleManager enabled="true" defaultProvider="SqlRoleManager" >
< providers>
< add name="SqlRoleManager" type="System.Web.Security.SqlRoleProvider" connectionStringName="myDbConnection" applicationName="MyApplication" />
< /providers>
< /roleManager>
Create the following set of tables to support the role based authorization and security system.
Ceate table User
(
UserID - pk
Username varchar(20),
Password varchar(20)
)
Ceate table SecurityGroupAssigns
(
AssignID - pk
UserID - fk
SecurityGroupId - fk
)
Ceate table SecurityGroup
(
SecurityGroupId - pk
Name
DisplayName
)
Create Table SecurityRightAssign
(
AssignID - PK
SecurityGroupId - fk
SecurityRightID - fk
)
Create Table SecurityRight
(
SecurityRightID - PK
SecurityRight - varchar
)
Tuesday, March 10, 2009
Success in small business.
Everyone wish to own a small business and want it to succeed. You may know that there are many competitors and all are well established. So the question is - "How do you make a difference"? How do you make sure that your services or products are viewed by your customer?
Never wait for a right time to start, Because today is the right time ! so just get started !
Success never comes easily. Start sharing your business information with maximum number of people through some presentable channel. NEVER SPEND LOT OF MONEY TO MARKET YOUR PRODUCT, USE CHEAPER OR FREE CHANNEL, because at beginning you may not have idea where the results will come from!
Digital Marketing will play key role in Success of Small Business
Here are the Top 10 secret of cost effective successful digital marketing
Try to keep your business details short, provide only basic information before your customer start asking you.
Try to improve the content and relation everytime you deal with your clients, treat him/her special.
Don't push too much to finalise any deal, patient, everything will happen with time. just follow the regular process.
Don't forget to follow up your clients (most of the time people give up at this point.)
Remember there is no magic for success, so keep doing the cycle for 90 days and see the result.
Never wait for a right time to start, Because today is the right time ! so just get started !
Success never comes easily. Start sharing your business information with maximum number of people through some presentable channel. NEVER SPEND LOT OF MONEY TO MARKET YOUR PRODUCT, USE CHEAPER OR FREE CHANNEL, because at beginning you may not have idea where the results will come from!
Digital Marketing will play key role in Success of Small Business
Here are the Top 10 secret of cost effective successful digital marketing
Try to keep your business details short, provide only basic information before your customer start asking you.
Try to improve the content and relation everytime you deal with your clients, treat him/her special.
Don't push too much to finalise any deal, patient, everything will happen with time. just follow the regular process.
Don't forget to follow up your clients (most of the time people give up at this point.)
Remember there is no magic for success, so keep doing the cycle for 90 days and see the result.
Subscribe to:
Comments (Atom)