Advertisement

01.21.2008 at 05:12AM PST, ID: 23098054
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

Auto Generate BLL for xsd DAL
Tags: asp.net 2.0, c#
Hi,

I've seen in many asp.net 2.0 projects this sample of code (same structure I mean). All projects are using XSD as data access layer and this BLL class just creates instances of strong typed datasets created by the xsd. I was wondering after I add an XSD and add a new table over there how do I auto generate this code? I mean where do I take this code from, for these classes which create instances of the xsd datasets which can be used as business logic classes?
I don't think that this code was manually written cause it looks exactly the same on all projects I saw by different coders.

Thanks,
Sagi
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using SmartestTableAdapters;
 
namespace RealTech
{
	[System.ComponentModel.DataObject]
	public class Users
	{
		//============================================================================//
		// PROPERTIES
		//============================================================================//
 
		/// <summary>
		/// Property
		/// Name: Adapter
		/// Type: TableAdapter
		/// </summary>
 
		private ST_USERSTableAdapter _Adapter = null;
		protected ST_USERSTableAdapter Adapter
		{
			get
			{
				if (_Adapter == null)
					_Adapter = new ST_USERSTableAdapter();
				return _Adapter;
			}
		}
		
		//============================================================================//
		// FUNCTIONS
		//============================================================================//
 
		/// <summary>
		/// Function
		/// Name: SelectUsers
		/// Desc: Select all
		/// </summary>
 
		[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, false)]
		public Smartest.ST_USERSDataTable SelectUsers()
		{
			return this.Adapter.SelectUsers();
		}
 
		/// <summary>
		/// Function
		/// Name: SelectUsers
		/// Desc: Select by ID
		/// </summary>
 
		[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, false)]
		public Smartest.ST_USERSDataTable SelectUsers(int USER_ID)
		{
			return this.Adapter.SelectUserByID(USER_ID);
		}
 
		/// <summary>
		/// Function
		/// Name: SelectUsers
		/// Desc: Select by Name
		/// </summary>
 
		[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, false)]
		public Smartest.ST_USERSDataTable SelectUsers(string USER_NAME)
		{
			return this.Adapter.SelectUsersByName(USER_NAME);
		}
 
		/// <summary>
		/// Function
		/// Name: SelectUsers
		/// Desc: Select by Login
		/// </summary>
 
		[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, false)]
		public Smartest.ST_USERSDataTable SelectUsers(string USER_EMAIL, string USER_PASSWORD)
		{
			return this.Adapter.SelectUserByLogin(USER_EMAIL, USER_PASSWORD);
		}
 
		/// <summary>
		/// Function
		/// Name: DeleteUser
		/// Desc: Delete
		/// </summary>
 
		[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
		public bool DeleteUser(int USER_ID)
		{
			// Delete the record
			int rowsAffected = this.Adapter.Delete(USER_ID);
 
			// Return true if precisely one row was deleted, otherwise false
			return rowsAffected == 1;
		}
 
		/// <summary>
		/// Function
		/// Name: InsertUser
		/// Desc: Insert
		/// </summary>
 
		[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
		public bool InsertUser(	DateTime USER_CREATETIME,
								int USER_CREATEBY,
								DateTime USER_UPDATETIME,
								int USER_UPDATEBY,
								int USER_STATUS,
								string USER_NAME,
								string USER_DESC,
								int USER_COUNTRY_ID,
								int USER_CITY_ID,
								string USER_ADDRESS,
								string USER_ZIP,
								string USER_PHONE,
								string USER_MOBILE,
								string USER_FAX,
								string USER_EMAIL,
								string USER_PASSWORD,
								bool USER_ADMIN)
		{
			// Create a new row instance
			Smartest.ST_USERSDataTable Users = new Smartest.ST_USERSDataTable();
			Smartest.ST_USERSRow User = Users.NewST_USERSRow();
 
			// Fill the parameters
			User.USER_CREATETIME = USER_CREATETIME;
			User.USER_CREATEBY = USER_CREATEBY;
			User.USER_UPDATETIME = USER_UPDATETIME;
			User.USER_UPDATEBY = USER_UPDATEBY;
			User.USER_STATUS = USER_STATUS;
			User.USER_NAME = USER_NAME;
			User.USER_DESC = USER_DESC;
			User.USER_COUNTRY_ID = USER_COUNTRY_ID;
			User.USER_CITY_ID = USER_CITY_ID;
			User.USER_ADDRESS = USER_ADDRESS;
			User.USER_ZIP = USER_ZIP;
			User.USER_PHONE = USER_PHONE;
			User.USER_MOBILE = USER_MOBILE;
			User.USER_FAX = USER_FAX;
			User.USER_EMAIL = USER_EMAIL;
			User.USER_PASSWORD = USER_PASSWORD;
			User.USER_ADMIN = USER_ADMIN;
			
			// Insert the record
			Users.AddST_USERSRow(User);
			int rowsAffected = this.Adapter.Update(Users);
 
			// Return true if precisely one row was inserted, otherwise false
			return rowsAffected == 1;
		}
 
		/// <summary>
		/// Function
		/// Name: UpdateUser
		/// Desc: Update
		/// </summary>
 
		[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
		public bool UpdateUser( int USER_ID,
								DateTime USER_UPDATETIME,
								int USER_UPDATEBY,
								int USER_STATUS,
								string USER_NAME,
								string USER_DESC,
								int USER_COUNTRY_ID,
								int USER_CITY_ID,
								string USER_ADDRESS,
								string USER_ZIP,
								string USER_PHONE,
								string USER_MOBILE,
								string USER_FAX,
								string USER_EMAIL,
								string USER_PASSWORD,
								bool USER_ADMIN)
		{
			// Check if exist by id
			Smartest.ST_USERSDataTable Users = this.Adapter.SelectUserByID(USER_ID);
			if (Users.Count == 0)
				return false;
 
			// Create the row instance
			Smartest.ST_USERSRow User = Users[0];
 
			// Fill the parameters
			User.USER_UPDATETIME = USER_UPDATETIME;
			User.USER_UPDATEBY = USER_UPDATEBY;
			User.USER_STATUS = USER_STATUS;
			User.USER_NAME = USER_NAME;
			User.USER_DESC = USER_DESC;
			User.USER_COUNTRY_ID = USER_COUNTRY_ID;
			User.USER_CITY_ID = USER_CITY_ID;
			User.USER_ADDRESS = USER_ADDRESS;
			User.USER_ZIP = USER_ZIP;
			User.USER_PHONE = USER_PHONE;
			User.USER_MOBILE = USER_MOBILE;
			User.USER_FAX = USER_FAX;
			User.USER_EMAIL = USER_EMAIL;
			User.USER_PASSWORD = USER_PASSWORD;
			User.USER_ADMIN = USER_ADMIN;
 
			// Update the record
			int rowsAffected = this.Adapter.Update(User);
 
			// Return true if precisely one row was updated, otherwise false
			return rowsAffected == 1;
		}
	}
}
Start your free trial to view this solution
Question Stats
Zone: Microsoft
Question Asked By: sagir
Solution Provided By: PlatoConsultant
Participating Experts: 3
Solution Grade: A
Views: 183
Translate:
Loading Advertisement...
01.21.2008 at 05:22AM PST, ID: 20705762

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.21.2008 at 05:23AM PST, ID: 20705775

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.21.2008 at 05:25AM PST, ID: 20705793

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.21.2008 at 05:25AM PST, ID: 20705796

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.21.2008 at 05:37AM PST, ID: 20705892

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.21.2008 at 07:25AM PST, ID: 20706642

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
01.22.2008 at 08:52AM PST, ID: 20715882

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.15.2008 at 11:33PM PST, ID: 20908717

Rank: Sage

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
Microsoft
  • Internet Protocols
  • Applications
  • Development
  • OS
  • Hardware
  • Windows Security
Apple
  • Operating Systems
  • Hardware
  • Programming
  • Networking
  • Software
Internet
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Spy / Ad Blockers
  • Web Browsers
  • New Net Users
  • Web Development
  • Chat / IM
  • Anti Spam
  • Web Servers
  • Anti-Virus
  • Email Clients
Gamers
  • Tips
  • Online / MMORPG
  • Puzzle
  • Emulators
  • Action / Adventure
  • Role Playing
  • Consoles
  • Game Programming
  • Strategy
  • Sports
  • Misc
  • Computer Games
Digital Living
  • Hardware
  • New Net Users
  • New Users
  • Software
  • Digital Music
  • Gaming World
  • Home Security
  • Apple
  • Networking Hardware
Virus & Spyware
  • Vulnerabilities
  • IDS
  • Encryption
  • Anti-Virus
  • Operating Systems Security
  • Software Firewalls
  • WebApplications
  • Cell Phones
  • Operating Systems
  • Internet
  • Hardware Firewalls
Hardware
  • Handhelds / PDAs
  • Displays / Monitors
  • Components
  • Networking Hardware
  • Peripherals
  • Laptops/Notebooks
  • Storage
  • Servers
  • Desktops
  • New Users
  • Misc
  • Apple
Software
  • System Utilities
  • Industry Specific
  • Network Management
  • Photos / Graphics
  • Page Layout
  • VMWare
  • Misc
  • Web Development
  • OS
  • CYGWIN
  • Voice Recognition
  • Message Queue
  • Quality Assurance
  • Security
  • Firewalls
  • MultiMedia Applications
  • Development
  • Database
  • Office / Productivity
  • Business Management
  • OS/2 Apps
  • Server Software
  • Internet / Email
ITPro
  • OS
  • Storage
  • Encryption
  • Operating Systems Security
  • Apple Hardware
  • Laptops & Notebooks
  • Servers
  • Networking Hardware
  • Peripherals
  • Devices
  • Displays / Monitors
  • WebTrends / Stats
  • Search Engines
  • Firewalls
  • WebApplications
  • IDS
  • Vulnerabilities
  • Email Clients
  • File Sharing
  • Spy / Ad Blockers
  • Web Browsers
  • Web Servers
  • Networking
  • Anti-Virus
  • Chat / IM
  • Anti Spam
Developer
  • Web Servers
  • Web Browsers
  • Game Programming
  • Dev Tools
  • Industry Specific
  • Office / Productivity
  • Database
  • CYGWIN
  • Web Development
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Programming
  • Content Management
  • Application Servers
  • Protocols
Storage
  • Removable Backup Media
  • Storage Technology
  • Servers
  • Grid
  • Remote Access
  • Backup / Restore
  • Misc
  • Hard Drives
OS
  • Miscellaneous
  • Security
  • Development
  • Linux
  • VMWare
  • MainFrame OS
  • Unix
  • Apple
  • OS / 2
  • AS / 400
  • BeOS
  • Microsoft
  • VMS / OpenVMS
Database
  • Oracle
  • Miscellaneous
  • MySQL
  • Software
  • Sybase
  • Contact Management
  • PostgreSQL
  • Data Manipulation
  • Clarion
  • InterSystems Cache
  • Siebel
  • MUMPS
  • OLAP
  • SQLBase
  • SAS
  • GIS & GPS
  • 4GL
  • Berkeley DB
  • DB2
  • Informix
  • Interbase / Firebird
  • FoxPro
  • Reporting
  • LDAP
  • Filemaker Pro
  • MS SQL Server
  • dBase
  • MS Access
Security
  • Misc
  • Web Browsers
  • Software Firewalls
  • Operating Systems Security
  • File Sharing
  • Spy / Ad Blockers
  • Vulnerabilities
  • WebApplications
  • IDS
  • Anti-Virus
  • Encryption
  • Anti Spam
  • Email Clients
  • VPN
  • Chat / IM
Programming
  • Editors IDEs
  • Installation
  • Handhelds / PDAs
  • Multimedia Programming
  • System / Kernel
  • Algorithms
  • Game
  • Signal Processing
  • Project Management
  • Open Source
  • Database
  • Misc
  • Languages
  • Processor Platforms
  • Theory
Web Development
  • Scripting
  • Blogs
  • Web Servers
  • Software
  • Search Engines
  • Web Graphics
  • Images
  • Internet Marketing
  • Images and Photos
  • Components
  • Document Imaging
  • Web Languages/Standards
  • Illustration
  • WebApplications
  • Fonts
  • WebTrends / Stats
  • Authoring
  • Digital Camera Software
  • Miscellaneous
Networking
  • Protocols
  • Apple Networking
  • Network Management
  • Message Queue
  • Application Servers
  • Content Management
  • File Servers
  • Email Servers
  • Misc
  • Java Editors & IDEs
  • Wireless
  • Networking Hardware
  • Backup / Restore
  • System Utilities
  • ISPs & Hosting
  • Web Servers
  • Storage Technology
  • Removable Backup Media
  • Servers
  • Broadband
  • Grid
  • OS / 2
  • Novell Netware
  • Unix Networking
  • Windows Networking
  • Security
  • Telecommunications
  • Operating Systems
  • Linux Networking
Other
  • Community Advisor
  • Lounge
  • Community Support
  • New Net Users
  • Philosophy / Religion
  • Math / Science
  • Miscellaneous
  • URLs
  • Expert Lounge
  • Politics
  • Puzzles / Riddles
Community Support
  • Suggestions
  • New to EE
  • New Topics
  • Community Advisor
  • CleanUp
  • Announcements
  • General
  • Feedback
  • Input
  • EE Bugs
 
01.21.2008 at 05:22AM PST, ID: 20705762
TierDeveloper is a template-based code generating tool for .NET. It features ASP.NET, WinForms and Business & data objects framework.  

http://www.alachisoft.com/

it is really cool tool for little price
 
01.21.2008 at 05:23AM PST, ID: 20705775

Rank: Master

Looks a bit like Scott Mitchell's code: http://msdn2.microsoft.com/en-us/library/aa581779.aspx
 
01.21.2008 at 05:25AM PST, ID: 20705793
So you mean that this code I showed was generated by a non-free tool? I don't think so..

Are there any more possibilities?
 
01.21.2008 at 05:25AM PST, ID: 20705796
Open source contribution to this is also available
The .NET Entity Objects Framework

Neo is a framework for .NET developers who want to write enterprise applications with an object-based domain model. It is well suited for domain-driven design and agile development.

Neo includes tools that create an extensible object-based domain model as well as the database schema from a an abstract description of the model. At runtime, rich schema information is used to dynamically generate all SQL required for object persistence management. Being based on ADO.NET data sets, a Neo domain model is independent of the actual backing store and works equally well with databases and objects in an XML representation.

http://neo.sourceforge.net
Accepted Solution
 
01.21.2008 at 05:37AM PST, ID: 20705892
vb_jonas:
yep it looks exactly like this code. I thought that it is some template or generator which is supplied with visual studio 2005...
 
01.21.2008 at 07:25AM PST, ID: 20706642
So nothing built in Visual Studio 2005 which will generate these type of codes? (BLLs)
 
01.22.2008 at 08:52AM PST, ID: 20715882
No I dont Find any Tool to Generate BLL in the VS 2005  it only generates Dataset and Data adapter classes


  if u find plz let me know to make my life easier also


 
 
02.15.2008 at 11:33PM PST, ID: 20908717

Rank: Sage

No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I will leave the following recommendation for this question in the Cleanup topic area:
   Accept: PlatoConsultant {http:#20705796}

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

Jim Brandley
EE Cleanup Volunteer
 
 
02.20.2008 at 03:46PM PST, ID: 20943371
Forced accept.

Computer101
Community Support Moderator
 
 
 
20080236-EE-VQP-29 / EE_QW_2_20070628