Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 4th, 2013, 08:00 PM
Authorized User
 
Join Date: Oct 2012
Posts: 27
Thanks: 4
Thanked 2 Times in 2 Posts
Default Using entities with hand-coding

I need to use hand-coding in my data access pages and am using the example in chapter 15, page 555, which works fine.
However, I also need to make some other operations, like deleting all the rows in a table/entity, then populating it with rows from another table/entity.
I would highly appreciate some indications about, like code examples or references for help.
 
Old February 5th, 2013, 07:28 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

I am not sure I understand what you're trying to accomplish or why you can't do that with what you already know. Can't you just query objects using LINQ, remove them and then save the changes?

If there are a lot of rows, you may want to use direct SQL instead. In that case, Google for objects like SqlConnection and SqlCommand that let you work with data in a SQL Server database directly.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old February 5th, 2013, 07:58 AM
Authorized User
 
Join Date: Oct 2012
Posts: 27
Thanks: 4
Thanked 2 Times in 2 Posts
Default Thank you.

Thank you very much for yor suggestion.

I found some interesting code examples in the series of lessons starting with:
http://www.ezineasp.net/post/Creatin...ng-Wizard.aspx





Similar Threads
Thread Thread Starter Forum Replies Last Post
ch. 15 - Hand Coding Data Acess Code Tulsi BOOK: Beginning ASP.NET 4 : in C# and VB 6 January 11th, 2013 03:45 AM
Binding dropdown list in code behind with hand coding sophia BOOK: Beginning ASP.NET 4 : in C# and VB 1 December 27th, 2011 05:10 PM
Convert DAO Coding to ADO Coding udaybg1 VB How-To 0 August 9th, 2011 08:50 AM
Hand Coding VS Data Wizards Bulldog BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 3 May 22nd, 2007 04:21 AM
'hand' is undefined crmpicco Javascript How-To 3 March 10th, 2005 10:43 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.