linq to sqlҪעÒâµÄ
using (DataClasses1DataContext a = new DataClasses1DataContext())
{
}
ÕâÑùд±È½Ï·½±ã
¸üÐÂʱ,Èç¹û±íûÓÐÖ÷¼ü,ÄDz»»á¸üÐÂ,Ò²²»»á±¨´í,ÉèÁËÖ÷¼üºó,ÖØ¿ªÁ¬½Ó,ÖØÐÂÍÏÒ»¸öµ½ContextÀïÃæ
Èç¹û±íµÄÓ³ÉäÀ಻ÊÇ´ÓcontextÀïÃæËѳöÀ´µÄ,¶øÊÇ×Ô¼ºnewµÄ
ÓÃcontext.±íÀà.Attach(ÍâÃæµÄÀà,true/false)¸üÐÂ
Ïà¹ØÎĵµ£º
1.Ñ¡Ôñ×îÓÐЧÂʵıíÃû˳Ðò(Ö»ÔÚ»ùÓÚ¹æÔòµÄÓÅ»¯Æ÷ÖÐÓÐЧ)¡¡¡¡
¡¡¡¡ SQLSERVERµÄ½âÎöÆ÷°´ÕÕ´ÓÓÒµ½×óµÄ˳Ðò´¦Àífrom×Ó¾äÖеıíÃû£¬Òò´Ëfrom×Ó¾äÖÐдÔÚ×îºóµÄ±í£¨»ù´¡±ídriving table£©½«±»×îÏÈ´¦Àí£¬ÔÚfrom×Ó¾äÖаüº¬¶à¸ö±íµÄÇé¿öÏ£¬±ØÐëÑ¡Ôñ¼Ç¼ÌõÊý×îÉٵıí×÷Ϊ»ù´¡±í£¬µ±SQLSERVER´¦Àí¶à¸ö±íʱ£¬»áÔËÓÃÅÅÐò¼°ºÏ²¢µÄ·½Ê½Á ......
SQLÈÕÆÚ¸ñʽ»¯
0 »ò 100 (*) ĬÈÏÖµ mon dd yyyy hh:miAM£¨»ò PM£©
1 101 ÃÀ¹ú mm/dd/yyyy   ......
package com.itcast.service.base;
import java.util.LinkedHashMap;
import javax.persistence.Entity;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;
import org.springframework.transaction.annotation.Propagation;
import org.spri ......
¹ØÓÚDBAµÄ½ÇÉ«
Éú²úDBA
ÊôÓÚ´«Í³DBA½ÇÉ«£¬Êǹ«Ë¾µÄ‘±£µ¥’£¬È·±£Éú²úÊý¾Ý²»»á³ö´í¡£»¹¸ºÔðÈ·±£·þÎñÆ÷Ò»×îÓÅ»¯µÄ·½Ê½ÔËÐУ¬²¢´Ù½øÊý¾Ý¿â´Ó¿ª·¢ÆÚתµ½QAÔÙתµ½Éú²ú¡£
Éú²úDBAµÄÆäËûһЩ½ÇÉ«°üÀ¨ÒÔÏ·½Ã棺
1£© °²×°SQL Server ʵÀýºÍ²¹¶¡°ü¡£
2£© ¼àÊÓÐÔÄÜÎÊÌâ¡£
3£© °²×°À´×Ô¿ª·¢ÈËÔ±µÄ½ ......