Entity FrameWork 使用详情

Entity FrameWork 是以ADO.net为基础发展的ORM解决方案。

一、安装Entity FrameWork框架

二、添加ADO.Net实体数据模型

三、EF插入数据

四、EF删除数据

五、EF修改数据

六、EF 查询数据

1.简单查询

2. skip(10) => 逃过10条数据,take(10) => 获取10条数据

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EFDemo
{
    class Program
    {
        static void Main(string[] args)
        {
            testContext dbContext = new testContext();
            var list = dbContext.employee.Skip(1).Take(2);
            foreach (var item in list)
            {
                Console.WriteLine(item.name);
            }
            Console.ReadKey();
        }
    }
}

猜你喜欢

转载自www.cnblogs.com/yang-2018/p/10222140.html