Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio
This is the forum to discuss the Wrox book ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solution by Vincent Varallo; ISBN: 9780470396865
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 19th, 2009, 01:40 PM
Authorized User
 
Join Date: Mar 2009
Posts: 79
Thanks: 4
Thanked 4 Times in 4 Posts
Default Applied Framework Guidance

Was wondering if anyone can provide a rough outline of what steps should be taken when applying the Framwork discussed in the book to other projects.

I messed around with the code generator a bit but can't get it to work, so I will be doing everything thing by hand until I can get it working. I only need an outline of steps, I can figure the reset out.

Thanks
  #2 (permalink)  
Old March 20th, 2009, 12:39 PM
Wrox Author
 
Join Date: Jan 2009
Posts: 73
Thanks: 0
Thanked 7 Times in 7 Posts
Default

Here are the steps I usually follow to create a new data entry page.

1. Create the tables and stored procedures in the database.
2. Drag the tables onto the ORM Designer in the DAL project.
3. Drag the "Select" stored procedures on top of the Tables in the ORM Designer. This will make the return value of the method a list of the table's entity object.
4. Drag the Insert, Update, and Delete stored procedures to the methods pane of the ORM Designer.
5. Add the partial class declaration in the CustomizedEntities file to the table's entity classes implement the IENTBaseEntity interface.
6. Run the code generator to create the table's Data class.
7. Run the code generator to create the table's edit objects in the BLL project.
8. Create a page that lists all the records in the table and allows the user to edit, delete, or add new records.
9. Create the UI page with textboxes, dropdown lists, and other controls depending on what you are doing.
10. Test, test, and test again.

This assumes you've already setup the database and security tables.

Hope this helps
  #3 (permalink)  
Old March 20th, 2009, 06:33 PM
Authorized User
 
Join Date: Mar 2009
Posts: 79
Thanks: 4
Thanked 4 Times in 4 Posts
Default

Vince,

This is exactly what I was looking for. I didnt know if there was any sort of clean up process you could use or should do to get rid of everything from the HRPaidTimeOff solution you no longer need and make a base, vanilla Framework that is ready to deploy on other projects.

I am working on that vanilla Framework next week. I will post my steps for clean up when done if you dont beat me to it.

When I get comfortable with using this lovely Framework of yours I will begin to modify it. I will post some of the worthwhile things here for all to enjoy. I am very interested in integration with MS WFC, Expression Studio, and AJAX. But what you provided Vince has to be the best Book to come in a long time.

I look forward to more books like these.

Thanks
  #4 (permalink)  
Old March 23rd, 2009, 07:14 PM
Authorized User
 
Join Date: Mar 2009
Posts: 79
Thanks: 4
Thanked 4 Times in 4 Posts
Default

To anyone who can help.

I have been messing around with cleaning up the Framework to get it to where I copy the files to a IIS share and can begin coding.

I followed the steps above trying to get a simple framwork modification test going. On compile I got an error:

Code:
 
V2.PaidTimeOffDAL.AETransfers' does not implement interface member 'V2.PaidTimeOffDAL.Framework.IENTBaseEntity.InsertDate
Actually I got an error for all of interface objects that reside inside of IENTBaseEntity

Code:
 
namespace V2.PaidTimeOffDAL.Framework
{
public interface IENTBaseEntity
{
DateTime InsertDate { get; set; }
int InsertENTUserAccountId { get; set; }
DateTime UpdateDate { get; set; }
int UpdateENTUserAccountId { get; set; }
Binary Version { get; set; } 
}
I take it that, it expects these fields to be present in the table, which they are, however I am lost on how to resolve it. I went back to Chpt 2 but do not see anything that relates to these errors. If you need more infomration please let me know.
  #5 (permalink)  
Old March 23rd, 2009, 08:20 PM
Wrox Author
 
Join Date: Jan 2009
Posts: 73
Thanks: 0
Thanked 7 Times in 7 Posts
Default

The table must have these 5 fields. You also must drag the table onto the ORM designer to create the entity class. Then you need to declare a partial class and name it the same as the entity class and have it implement the IENTBaseEntity interface.

Based on your sample code do you have a table called AETransfers and did you create an entity class called AETransfers by dragging it to the ORM designer? Does the table have all 5 fields and are they the correct type?
  #6 (permalink)  
Old March 23rd, 2009, 08:33 PM
Authorized User
 
Join Date: Mar 2009
Posts: 79
Thanks: 4
Thanked 4 Times in 4 Posts
Default

Thanks for the reply. The only thing that I havent double verified are the field types. Other than that I completed everything you stated in the same order.

I will let you know the outcome once I reverify.
  #7 (permalink)  
Old March 24th, 2009, 04:44 PM
Authorized User
 
Join Date: Mar 2009
Posts: 79
Thanks: 4
Thanked 4 Times in 4 Posts
Default

I have figured out what was the cause for this behavior.

It appears that the fields inherited from the IENTBaseEntity interface are expected to appear in the order listed in the IENTBaseEntity. Meaning that any table you will use in the Framework will need to have InsertDate, InsertENTUserAccountId, UpdateDate, UpdateENTUserAccountId and Version added to the table as the last 5 fields in the same order. Anyother order results in the error above.

It is also worth mentioning that you need to pay attention to what the ORM names your table when you drag it to it. For whatever reason the ORM kept leaving the 's' off my table's name AETransfers.

Thanks for the help.
  #8 (permalink)  
Old September 15th, 2009, 02:23 PM
Registered User
 
Join Date: Jul 2003
Location: AYLESBURY, Bucks, United Kingdom.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by ZeroFactorial View Post
It is also worth mentioning that you need to pay attention to what the ORM names your table when you drag it to it. For whatever reason the ORM kept leaving the 's' off my table's name AETransfers.
Bit late I know, but the reason for this is that the ORM depluralises (singularises?) where it can, based on the fact that the table represents multiple AETransfer records and the ORM is generating a representation of a single record.
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS not get applied in CR Export functionality skdevre Crystal Reports 0 April 10th, 2007 02:38 AM
changing host server framework 2.0 from framework jay_vijesh ASP.NET 1.x and 2.0 Application Design 1 September 11th, 2006 02:18 PM
Multiple xsl styles applied to central xml doc patgibbs1 XSLT 1 March 20th, 2006 11:52 AM
How use framework components in compact framework? r_bazghaleh C# 0 February 19th, 2006 05:05 AM
Where is the code for J2EE Design Patterns Applied stony All Other Wrox Books 2 May 3rd, 2004 09:54 PM



All times are GMT -4. The time now is 12:43 AM.


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