易截截图软件、单文件、免安装、纯绿色、仅160KB

linq to sql 详

最近学习 linq to sql 感觉还是可以的,方便快捷,以前问是以为不好用,不想用,但是今天用了一下感觉还是不错的, 确实是快,但是我又在想
如果出错了怎么办,这样一个类里放那么多的文件是有点不好,再说了 linq to sql 低层不知道怎么实现的,还是没有自己写的访问感觉舒服点呵呵!!!
如果是快速开发用 linq to sql 还是不错的选择啊!!!
-
基本的增删除改查
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;
namespace WebServiceText
{
/// <summary>
/// Service1 的摘要说明
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ToolboxItem(false)]
// 若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务,请取消对下行的注释。
// [System.Web.Script.Services.ScriptService]
public class Service1 : System.Web.Services.WebService
{
DataClasses1DataContext context = new DataClasses1DataContext();
[WebMethod]
public List<Text> selectSwhere(int startid,int endid)
{
var result = (from text in context.Text
where text.id >= startid && text .id <=endid
select text).ToList<Text>();
return result;
}
[WebMethod]
public List<Text> selectAll()
{
return context.Text.ToList<Text>();
}
/// <summary>
/// 添加一个数据
/// </summary>
/// <param name="sex">性别</param>
/// <param name="age">年龄</param>
/// <returns>成功为True否则为False</returns>
[WebMethod]
public List<Text> addText(string sex, int age)
{
Te


相关文档:

sql server的tinyint类型与.net中的谁对应

 .NET中C#的byte关键字映射.NET的Byte结构:表示一个 8 位无符号整数。Byte 值类型表示值介于 0 和 255 之间的无符号整数。
.NET中C#的short关键字映射.NET中的Int16:有符号 16 位整数,-32,768 到 32,767。
SQL SERVER中的tinyint:从 0 到 255 的整型数据。存储大小为 1 字节。
sbyte:存储8位带符号整数。sbyt ......

SQL手工注射原理

     关于SQL注入(SQL Injection)的方法其实都很普遍和使用,归纳起来也很方便。一般“黑客”使用的是现成的工具如“WEB旁注、阿D网络工具包、教主XXX”等这些都是集成了
一些常用的sql注入语句。下面我将介绍如何使用手工注入MYSQL,MSSQL数据库.
    一般漏洞产 ......

SQL Server TEXT类型字段字符串替换示例处理脚本

 /*--text字段的替换处理  
  --*/  
  --创建数据测试环境  
--create   table   #tb(aa   text)
declare @s_str varchar(8000),@d_str varchar(8000),  --定义替换的字符串 
        ......

DBA常用sql(一)

--监控索引是否使用 alter index &index_name monitoring usage; alter index &index_name nomonitoring usage; select * from v$object_usage where index_name = &index_name;
--求数据文件的I/O分布 select df.name,phyrds,phywrts,phyblkrd,phyblkwrt,singleblkrds,readtim,writetim from v$filestat fs,v ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号