|
|
 |
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0  | This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640 |
|
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
|
 |

April 13th, 2009, 01:39 PM
|
|
Authorized User
|
|
Join Date: Mar 2009
Posts: 20
Thanks: 7
Thanked 0 Times in 0 Posts
|
|
Why do we need to maintain "static" methods in the Article.cs?
Hi,
Can anybody please explain why do we need to have static methods ie
public static int InsertArticle()
public static List<Article> GetArticles()
public static int GetArticleCount(int CategoryID) etc?
And another one that is bothering me is that the logic is separated between two methods
suppose say, we have
public bool Delete() which in turn calls Article.DeleteArticle().
I was not able to understand the purpose of this approach? why can we not have a single method for deleting an article in the Article.cs?
Hope somebody helps me to clarify this.
Thank you!
|

April 13th, 2009, 02:31 PM
|
 |
Wrox Author
|
|
Join Date: Jan 2008
Location: Decatur, IL, USA.
Posts: 807
Thanks: 12
Thanked 140 Times in 140 Posts
|
|
I actually answered a very similar question about a month ago in another forum. Rather than duplicate the answer here, I'll post the link to it and let you check it out for yourself.
http://forums.asp.net/t/1390937.aspx
|

April 13th, 2009, 02:44 PM
|
|
Authorized User
|
|
Join Date: Mar 2009
Posts: 20
Thanks: 7
Thanked 0 Times in 0 Posts
|
|
Thanks Lee, Now I understand this better.
|

April 13th, 2009, 02:55 PM
|
 |
Wrox Author
|
|
Join Date: Jan 2008
Location: Decatur, IL, USA.
Posts: 807
Thanks: 12
Thanked 140 Times in 140 Posts
|
|
You're welcome.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |