English 中文(简体)
是否有LinqPad nutshell数据库的专用版本。
原标题:Is there a SQLite version of the LinqPad nutshell database

我正试图与LINQPad学习LINQ,但事实是,我有一本说明书。

因此,我不想在服务器上安装服务器(我甚至不认为我可以这样做)。

一些LINQPAD 实例使用一个名为nutshell.mdf的数据库。 我很想知道,我是否能够找到这一数据库的库图形版本?

最佳回答

这里没有一刀切的版本,但你可以轻松地制作一份CEQ版。 CE是轻度的,赢得了笔记本。 LINQPadsupport CE:点击“AddLink”,选择LINQ至Q,点击CE和计票,创建数据库,点击K。 接着,SQK型号用于制造该表,以下文字将创建Nutshell样本数据库:

create table Customer
(
    ID int not null primary key,
    Name nvarchar(30) not null
)
go
create table Purchase
(
    ID int not null primary key,
    CustomerID int null references Customer (ID),
    Date datetime not null,
    Description nvarchar(30) not null,
    Price decimal not null
)
go
create table PurchaseItem
(
    ID int not null primary key,
    PurchaseID int not null references Purchase (ID),
    Detail nvarchar(30) not null,
    Price decimal not null
)
go
create table MedicalArticles
(
    ID int not null primary key,
    Topic nvarchar (20),
    Abstract nvarchar (2000)    
)
go
create table Product
(
    ID int not null primary key,
    Description nvarchar(30) not null,
    Discontinued bit not null,
    LastSale datetime not null
)
go
insert Customer values (1,  Tom )
go
insert Customer values (2,  Dick )
go
insert Customer values (3,  Harry )
go
insert Customer values (4,  Mary )
go
insert Customer values (5,  Jay )
go
insert Purchase values (1, 1,  2006-1-1 ,  Bike , 500)
go
insert Purchase values (2, 1,  2006-1-2 ,  Holiday , 2000)
go
insert Purchase values (3, 2,  2007-1-3 ,  Bike , 600)
go
insert Purchase values (4, 2,  2007-1-4 ,  Phone , 300)
go
insert Purchase values (5, 3,  2007-1-5 ,  Hat , 50)
go
insert Purchase values (6, 4,  2008-1-6 ,  Car , 15000)
go
insert Purchase values (7, 4,  2008-1-7 ,  Boat , 30000)
go
insert Purchase values (8, 4,  2008-1-8 ,  Camera , 1200)
go
insert Purchase values (9, null,  2008-1-9 ,  Jacket , 80)
go
insert PurchaseItem values (1, 2,  Flight , 1500)
go
insert PurchaseItem values (2, 2,  Accommodation , 500)
go
insert PurchaseItem values (3, 2,  Camera , 400)
go
insert MedicalArticles values (1,  Influenza ,  <this is the abstract...> )
go
insert MedicalArticles values (2,  Diabetes ,  <this is the abstract...> )
go
insert Product values (1,  Widget , 0,  2007-1-1 )
问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签