| | |
LINQ insert method problem, .NET 3.5, VS2008, LINQ
Please support our ASP.NET advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Dec 2007
Posts: 3
Reputation:
Solved Threads: 0
Overview
I have a form that the user fills in.
A event to my C# codebehind page fires on the save button click.
The btnSave_Click method load up the 3 LINQ Entities with the correct values.
I call the LINQ method "InsertProject" to insert the data into the SQL tables.
The error message I am getting is "The type arguments for method BLAH cannot be inferred from the usage. Try specifying the type arguments explicity.
This is my method
public static Project InsertProject(Security securityAccess, Proj project, Property property)
{
DevDataContext db = new DevDataContext();
db.Security.InsertOnSubmit(securityAccess);
db.SubmitChanges();
project.ControlID = securityAccess.ControlID;
db.Proj.InsertOnSubmit(project);
db.SubmitChanges();
projectProperty.ProjectID = project.ProjectID;
db.Property.InsertAllOnSubmit(projectProperty); <=== ERROR HERE
db.SubmitChanges();
return project;
}
I have a form that the user fills in.
A event to my C# codebehind page fires on the save button click.
The btnSave_Click method load up the 3 LINQ Entities with the correct values.
I call the LINQ method "InsertProject" to insert the data into the SQL tables.
The error message I am getting is "The type arguments for method BLAH cannot be inferred from the usage. Try specifying the type arguments explicity.
This is my method
public static Project InsertProject(Security securityAccess, Proj project, Property property)
{
DevDataContext db = new DevDataContext();
db.Security.InsertOnSubmit(securityAccess);
db.SubmitChanges();
project.ControlID = securityAccess.ControlID;
db.Proj.InsertOnSubmit(project);
db.SubmitChanges();
projectProperty.ProjectID = project.ProjectID;
db.Property.InsertAllOnSubmit(projectProperty); <=== ERROR HERE
db.SubmitChanges();
return project;
}
![]() |
Other Threads in the ASP.NET Forum
- Previous Thread: populating dropdownlist based on gridview selection
- Next Thread: Outlook 2007 Add-in Problem in Vista
| Thread Tools | Search this Thread |
.net 2.0 3.5 ajax alltypeofvideos appliances application asp asp.net beginner box browser businesslogiclayer button c# cac checkbox child class compatible content contenttype control countryselector courier dataaccesslayer database datagrid datagridview datalist deployment development dgv dialog dropdownmenu dynamic dynamically edit embeddingactivexcontrol feedback fileuploader fill findcontrol flash flv form gridview gudi iis image javascript list listbox menu mouse mssql nameisnotdeclared news novell numerical opera order parent problem radio ratings redirect registration relationaldatabases reportemail schoolproject search security select serializesmo.table sessionvariables silverlight smoobjects software sql sql-server ssl tracking treeview typeof validatedate validation vb.net videos vista visual-studio visualstudio vs2008 web webapplications webarchitecture webdevelopment webprogramming wizard xsl





