Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Asp.net MVC²¢²»½ö½öÖ»ÊÇLinq to SQL

    ºÜ¶àAsp.netµÄ½Ì³ÌÖеÄʾÀý´úÂëʹÓõÄÊý¾Ý·ÃÎÊ·½·¨ÊÇLinq to Sql»òÊÇEntity Framework¡£ÎÒÔÚwww.asp.netµÄÂÛ̳ÉÏ¿´µ½ºÜ¶à¹ØÓÚÌÖÂÛÊÇ·ñÓÐÆäËûÌæ´úµÄÊý¾Ý¿â·ÃÎÊ·½Ê½£¬»Ø´ðÊÇ£ºµ±È»ÓС£ÕâƪÎÄÕ¾ͽ²ÊöÁËʹÓÃAdo.Net×÷ΪÊý¾Ý·ÃÎʲãÀ´ÊµÏÖÒ»¸öµäÐ͵ÄÔöɾ²é¸Ä³ÌÐò¡£
    ÓÉÓÚÊÇÒÔÁ·Ï°×÷ΪĿµÄ£¬ÄÇÎҾͲ»·Á½èÓÃSpaanjaar’s µÄN²ã¹¹¼ÜÎÄÕ£¨Building Layered Web Applications with Microsoft ASP.NET 2.0.£©µÄ¹¹¼Ü·½Ê½¡£ÎÒÇ¿ÁÒÍƼöÄãÔĶÁËûµÄϵÁÐÎÄÕ£¬Èç¹ûÏÓÌ«³¤ÆðÂëÒ²µÃ¿´ÍêÇ°Á½²¿·Ö£¬ÕâÑù¾ÍÄܶÔN-Layer¹¹¼ÜÓиö»ù±¾µÄÈÏʶ¡£N-Layer¹¹¼ÜµÄÈý¸ö¹Ø¼ü²ã·Ö±ðΪ:ÒµÎñ¶ÔÏó²ã£¬ÒµÎñÂß¼­²ãºÍÊý¾Ý·ÃÎʲ㡣¶øÆäÊý¾Ý·ÃÎʲã»á¼¸ºõ²»¼Ó¸Ä±äµÄ°üº¬ÔÚ±¾ÎĵÄMVCÏîÄ¿ÖУ¬SpaanjaarµÄÎļþÏêϸÃèÊöÁ˸÷¸ö²ãÊÇÈçºÎ×éÖ¯µÄ¡£ÕâƪÎÄÕ½ö½ö½²Êö¸÷¸ö²ãËù°çÑݵĽÇÉ«£¬µ«ÊDz»»áÉîÈëµ½´úÂëµÄϸ½ÚÖС£
 
      Ê×ÏÈ£¬ÎÒÃÇÀ´¿´ImarÌṩµÄ³ÌÐò£¬ÕâÊÇÒ»¸ö¾ßÓеäÐÍÔöɾ²é¸ÄµÄ³ÌÐò,Õâ¸ö³ÌÐòÔÊÐíÓû§¹ÜÀíÁªÏµÈË£¬°üÀ¨ÁªÏµÈ˵ĵØÖ·£¬µç»°£¬email¡£ËüÄÜÔö£¬É¾£¬²é£¬¸ÄÈκÎʵÌå¡£
 
     ³ÌÐòÄÚ°üÀ¨µÄʵÌåÓÐ:ContactPersons, PhoneNumbers, Addresses EmailAddresses.ËûÃǶ¼Á¥ÊôÓÚ³ÌÐòµÄÒµÎñ¶ÔÏó£¨BO£©²ã¡£ÉÏÊöµÄÿһ¸öÀ඼°üº¬¿ÉÒÔ»ñÈ¡»òÕ߸³ÖµµÄÊôÐÔ£¬µ«²¢²»°üº¬Èκη½·¨¡£¶øËùÓз½·¨´æ·ÅÓÚÒµÎñÂß¼­²ã£¨BLL£©ÖеĶÔÓ¦ÀàÖС£ÔÚÒµÎñ¶ÔÏó²ãºÍÒµÎñÂß¼­²ãµÄʵÌåºÍʵÌåmangerÊÇÒ»¶ÔÒ»µÄ¹Øϵ£¬ÔÚÒµÎñÂß¼­²ãÖÐÀà°üº¬µÄ·½·¨¶¼»á·µ»ØÒµÎñ¶ÔÏó²ã(BO)µÄʵÀý£¬»òÊÇʵÀý¼¯ºÏ£¬»òÕß±£´æʵÀý£¨¸üлòÊÇÌí¼Ó£©£¬»òÊÇɾ³ýʵÀý¡£ÒµÎñÂß¼­²ã£¨BLL£©ÖÐÒ²¿ÉÒÔ°üº¬Ò»Ð©ÒµÎñ¹æÔòÑéÖ¤£¬°²È«ÐÔ¼ì²éµÄ´úÂë¡£µ«ÔÚ±¾ÆªÎÄÕÂΪÁ˼ò±ãÆð¼û£¬¾Í²»Ìí¼ÓÕâЩÁË¡£Èç¹ûÄã¶ÔÒµÎñ¹æÔòºÍ°²È«ÐÔÓÐÐËȤµÄ»°£¬¿ÉÒÔÈ¥¿´ImarÎÄÕµÄ6 part series¡£
      ×îºóÒ»²ãÊÇÊý¾Ý·ÃÎʲã(DAL)£¬Í¬Ñù£¬DAL²ãµÄÀàÒ²ºÍÒµÎñÂß¼­²ã£¨BLL£©ÄÚµÄÀàÓÐ×ÅÒ»¶ÔÒ»µÄ¹Øϵ£¬ÔÚBLL²ãµÄÀàÖлáµ÷ÓÃÏà¹ØDAL²ãÖеķ½·¨¡£¶øÔÚÕâЩ²ãÖУ¬Ö»ÓÐDAL²ãÐèÒªÖªµÀÀûÓÃʲô¼¼Êõ£¨linq,entity framework..£©±£´æÒµÎñʵÌå¡£ÔÚ±¾ÀýÖУ¬Ê¹ÓÃSql Server ExpressÊý¾Ý¿âºÍAdo.net¡£¶øÕâÑù·Ö²ãµÄ˼ÏëÊÇÈç¹ûÄãÐèÒª¸ü»»Êý¾ÝÔ´£¨XML£¬oracle£¬¸ü»òÕßÊÇWeb ServiceÉõÖÁÊÇLinq to Sql»òÕßÆäËûORM¿ò¼Ü£©£¬ÒòΪDAL²ã¸øBLL²ã±©Â©µÄ·½·¨µÄÇ©ÃûÊÇÒ»Öµģ¬ËùÒÔÖ»ÐèÒª¸ü»»


Ïà¹ØÎĵµ£º

asp.netʱ¼ä¸ñʽ´óÈ«

DateTime dt = DateTime.Now;
// Label1.Text = dt.ToString();//2005-11-5 13:21:25
// Label2.Text = dt.ToFileTime().ToString();//127756416859912816
// Label3.Text = dt.ToFileTimeUtc().ToString();//127756704859912816
// Label4.Text = dt.ToLocalTime().ToString();//2005-11-5 21:21:25
// Label5.Text = ......

½â¾öasp.netÒ³Ãæ²åÈëÊý¾ÝʱȨÏÞ²»×ãÎÊÌâ

static void Main(string[] args)
  {
  string connstr = "Data Source=***;user=system;password=***;";
  OracleConnection conn = new OracleConnection(connstr);
  conn.Open();
  string orclstr="insert into SYS.A_MODULE values('03','²é¿´Éú²úÈÎÎñ','²é¿´Éú²úÈÎÎñ½ø¶È')";
  ......

΢ÈíÆóÒµ¿â5.0ѧϰ±Ê¼Ç£¨¾Å£©ASP.NET WEBÓ¦ÓóÌÐò

ÔÚASP.NET Web´°ÌåÓ¦ÓóÌÐòÖУ¬ÍƼöµÄ·½·¨Êǽ«ÈÝÆ÷´æµ½ÓÉApplication×Öµä¶ÔÏóÌṩµÄÈ«¾Ö״̬¡£µ±ÐèÒªµÄʱºòÄã¿ÉÒÔ·ÃÎÊÈÝÆ÷£¬ÉõÖÁʹÓÃHTTPÄ£¿é×Ô¶¯Íê³É¶ÔÒ³ÃæÉϿؼþµÄ×¢Èë¡£
ͨ³£Çé¿öÏ£¬ÄãÓ¦¸ÃʹÓÃApplication×Öµä¶ÔÏóÀ´´æ´¢ÈÝÆ÷µÄµ¥¸öʵÀý¡£Äú¿ÉÄܾö¶¨´´½¨Ö÷ÒªÈÝÆ÷µÄ×ÓÈÝÆ÷£¬²¢½«ËüÃÇ´æ´¢µ½Ã¿¸öÓû§µÄSession¶ÔÏóÖУ¬ÉõÖÁ ......

ASP.NETÅäÖÃÎļþWeb.config

(Ò»).Web.ConfigÊÇÒÔXMLÎļþ¹æ·¶´æ´¢,ÅäÖÃÎļþ·ÖΪÒÔϸñʽ
1.ÅäÖýڴ¦Àí³ÌÐòÉùÃ÷
Ìص㣺 λÓÚÅäÖÃÎļþµÄ¶¥²¿£¬°üº¬ÔÚ<configSections>±êÖ¾ÖС£
2.Ìض¨Ó¦ÓóÌÐòÅäÖÃ
Ìصã: λÓÚ<appSetting>ÖС£ ¿ÉÒÔ¶¨ÒåÓ¦ÓóÌÐòµÄÈ«¾Ö³£Á¿ÉèÖõÈÐÅÏ¢.
3.ÅäÖýÚÉèÖÃ
Ìصã: λÓÚ<system.Web>½ÚÖУ¬¿ØÖÆAsp.netÔËÐÐÊ ......

ASP.NET 2.0 Page ¼ÓÔصĹý³Ì

Ö»ÓÐÔÚ¡òPageÖ¸ÁîÖÐÉèÖÃÁË£ºAutoEventWireup="true"£¬·þÎñÆ÷¶ËµÄ±àÒëÆ÷½«°´ÕÕ Page_eventname ·½·¨ÃûµÄÐÎʽ×Ô¶¯µÄ¼ì²éÏàӦʼþ´¦Àí·½·¨£¬×Ô¶¯ÊµÏÖʼþµÄ¶©ÔÄ¡£
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ