Этот баннер — требование Роскомнадзора для исполнения 152 ФЗ.
«На сайте осуществляется обработка файлов cookie, необходимых для работы сайта, а также для анализа использования сайта и улучшения предоставляемых сервисов с использованием метрической программы Яндекс.Метрика. Продолжая использовать сайт, вы даёте согласие с использованием данных технологий».
Политика конфиденциальности
|
|
|
Зачем надстраиваемый класс над TableAdapter?
|
|||
|---|---|---|---|
|
#18+
Доброго времени суток! При рассмотрения примера с сайта ASP.NET — http://www.asp.net/learn/dataaccess/tutorial01cs.aspx?tabid=63 наткнулся на следующий абзац While auto-generated code can be a great time saver, the code is often very generic and needs to be customized to meet the unique needs of an application. The risk of extending auto-generated code, though, is that the tool that generated the code might decide it's time to "regenerate" and overwrite your customizations. With .NET 2.0's new partial class concept, it's easy to split a class across multiple files. This enables us to add our own methods, properties, and events to the auto-generated classes without having to worry about Visual Studio overwriting our customizations. To demonstrate how to customize the DAL, let's add a GetProducts() method to the SuppliersRow class. The SuppliersRow class represents a single record in the Suppliers table; each supplier can provider zero to many products, so GetProducts() will return those products of the specified supplier. To accomplish this create a new class file in the App_Code folder named SuppliersRow.cs and add the following code: Подскажите пожалуйста, зачем еще надстраивать класс? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 06.09.2006, 16:10 |
|
||
|
Зачем надстраиваемый класс над TableAdapter?
|
|||
|---|---|---|---|
|
#18+
Здравствуйте, Snorry, Вы писали: S>Доброго времени суток! S>При рассмотрения примера с сайта ASP.NET — http://www.asp.net/learn/dataaccess/tutorial01cs.aspx?tabid=63 S>наткнулся на следующий абзац S>While auto-generated code can be a great time saver, the code is often very generic and needs to be customized to meet the unique needs of an application. The risk of extending auto-generated code, though, is that the tool that generated the code might decide it's time to "regenerate" and overwrite your customizations. With .NET 2.0's new partial class concept, it's easy to split a class across multiple files. This enables us to add our own methods, properties, and events to the auto-generated classes without having to worry about Visual Studio overwriting our customizations. S>To demonstrate how to customize the DAL, let's add a GetProducts() method to the SuppliersRow class. The SuppliersRow class represents a single record in the Suppliers table; each supplier can provider zero to many products, so GetProducts() will return those products of the specified supplier. To accomplish this create a new class file in the App_Code folder named SuppliersRow.cs and add the following code: S>Подскажите пожалуйста, зачем еще надстраивать класс? Спасибо, уже сам разобрался. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 08.09.2006, 09:59 |
|
||
|
|

start [/forum/topic.php?fid=18&msg=33972934&tid=1389800]: |
0ms |
get settings: |
8ms |
get forum list: |
23ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
71ms |
get topic data: |
12ms |
get forum data: |
3ms |
get page messages: |
45ms |
get tp. blocked users: |
1ms |
| others: | 233ms |
| total: | 404ms |

| 0 / 0 |
