In Focus
Kolkata Chapter Developer Day: May 25
C# Corner Delhi Chapter Meet, May-18, 2013 Official Recap
Istanbul Chapter May 2013 2nd Seminar Announced : Learn WinJS, Windows Store, MVC
ANNOUNCEMENT: April 2013 Month Winners
Email :
Password :
Remember me?
Forgot password
Contribute
An Article
A Blog
A News
A Video
A Link
An Interview Question
Ask a Question
TECHNOLOGIES
.NET 4.5
Current Affairs
Learn .NET
SharePoint 2010
Web Development
.NET Assemblies
Databases & DBA
LightSwitch 2012
SharePoint 2013
Web Services in C#
ADO.NET in C#
Design & Architecture
LINQ
Silverlight with C#
Windows 8
AJAX in C#
Exception Handling C#
Mobile & Embedded
Smart Devices
Windows Azure
Android Programming
Graphics Design
Office 2013
SQL
Windows Controls C#
Articles C#
Hardware
OOP/OOD
SQL Server 2012
Windows Forms C#
ASP.NET Controls in C#
How do I
Operating Systems
Testing
Windows Phone 8
ASP.NET MVC with C#
HTML 5
PHP
TypeScript
Windows Server 2012
ASP.NET Programming
Internet & Web
Products
Visual C#
Windows Store Apps
C# Language
iPhone/iPad
Project Management
Visual Studio .NET
Workflow Foundation in C#
C# Tutorials
Java
Reports using C#
Visual Studio 2010
WPF
C, C++, MFC
Java and .NET
Robotics & Hardware
Visual Studio 2012
XAML
Career Advice
JavaScript, CSS
Security in .NET
WCF with C#
XML
Chapters
JQuery
Request a new Category
|
View All
ANSWERS
BLOGS
VIDEOS
INTERVIEWS
BOOKS
LINKS
NEWS
CHAPTERS
CAREER ADVICE
Making your Web Browser in C#
HTML 5 vs Native Apps
After 3rd C# Corner ISTANBUL Chapter Seminar
Secure Your Android Application from Hackers
Why to fear Object Oriented Programming approach
Check upcoming B'day in Asp.net
Class vs Structure
Happy Birthday Destin Joy
Access Master Page Control In Child Page
Popup Example in WPF
Blog
LINQ To SQL:Creating a new entity
Posted by
Vijai Anand
in
Blogs
|
LINQ
on
Jun 22, 2011
In this blog we will be seeing how to create a new entity.
Tweet
1313
0
0
EmpDetails Table:
Code:
To create a new entity to the EmpDetails table.
using
System;
using
System.Collections.Generic;
using
System.Linq;
using
System.Text;
namespace
LINQ
{
class
Program
{
static
void
Main(
string
[] args)
{
DataClassesDataContext
dc =
new
DataClassesDataContext
();
EmpDetail
newEmp =
new
EmpDetail
();
newEmp.Name =
"Ranjith"
;
newEmp.Location =
"Mumbai"
;
newEmp.ID = 8;
newEmp.Dept =
"LN"
;
newEmp.Allowance = 56300;
dc.EmpDetails.InsertOnSubmit(newEmp);
dc.SubmitChanges();
}
}
}
This Feature is Sponsored By
DynamicPDF Merger is a developers dream for interacting with any existing PDF documents. Merge, append, split, form fill, flatten stamp and so much more.
LINQ To SQL:Update an entity
Querying a DataSet with DLINQ
post comment
COMMENT USING
PREMIUM SPONSORS
DynamicPDF Developer Components
DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and add new content to existing PDF documents from within your applications.
More Blogs from this Blogger
Popularity Trends option missing in SharePoint 2013 document library ribbon interface
Get all the site themes in SharePoint using PowerShell
Delete the user custom action from ECB using Client Object Model
Programmatically create an item inside the folder in SharePoint list
Access denied by business data connectivity in SharePoint 2013
Awarded Microsoft MVP Award 2013 - SharePoint Server
Send email in SharePoint 2010
How to create wiki page library in SharePoint using PowerShell
The policy cannot be deleted because it is still in use.
Focus on Content in SharePoint 2013
View All
SPONSORED BY
DynamicPDF ReportWriter Suite
PDF reports have never been easier to create. With our included WYSIWYG Designer, you can layout your reports, set up your data source and let DynamicPDF ReportWriter do the rest.
Follow @twitterapi
Latest Blogs
Get The Value From Datagridview To TextBox On c#
Making your Web Browser in C#
Compare strings using StringComparison.OrdinalIgnoreCase
How to write or create a text file in C#
Binding Text of One controls with another in WPF
Sharepoint 2013 installation failure
How to get thumbnail image from youtube embed code
Server.Transfer Vs Response.Redirect
Leverage “using” in C#
What is DISCO File?
View All
Poll
Result
All Polls
Favorite Computer Manufacturer
Who is your favorite Computer manufacturer?
Lenovo
HP
Dell
Toshiba
Acer
Sony
Who is your favorite Computer manufacturer?
Options
Votes
%
Lenovo
40
10.26
HP
19
4.87
Dell
213
54.62
Toshiba
54
13.85
Acer
48
12.31
Sony
16
4.10
Total
390
100%