Skip to content

Commit f160017

Browse files
initial commit
0 parents  commit f160017

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+4935
-0
lines changed

.gitattributes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
VB/* linguist-vendored
2+
scripts linguist-vendored
3+
*.css linguist-detectable=false
4+
*.aff linguist-detectable=false

.gitignore

Lines changed: 297 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,297 @@
1+
## Ignore Visual Studio temporary files, build results, and
2+
## files generated by popular Visual Studio add-ons.
3+
##
4+
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
5+
6+
# User-specific files
7+
*.suo
8+
*.user
9+
*.userosscache
10+
*.sln.docstates
11+
12+
# User-specific files (MonoDevelop/Xamarin Studio)
13+
*.userprefs
14+
15+
# Build results
16+
[Dd]ebug/
17+
[Dd]ebugPublic/
18+
[Rr]elease/
19+
[Rr]eleases/
20+
x64/
21+
x86/
22+
bld/
23+
[Oo]bj/
24+
[Ll]og/
25+
26+
# Visual Studio 2015 cache/options directory
27+
.vs/
28+
# Uncomment if you have tasks that create the project's static files in wwwroot
29+
#wwwroot/
30+
31+
# MSTest test Results
32+
[Tt]est[Rr]esult*/
33+
[Bb]uild[Ll]og.*
34+
35+
# NUNIT
36+
*.VisualState.xml
37+
TestResult.xml
38+
39+
# Build Results of an ATL Project
40+
[Dd]ebugPS/
41+
[Rr]eleasePS/
42+
dlldata.c
43+
44+
# Benchmark Results
45+
BenchmarkDotNet.Artifacts/
46+
47+
# .NET Core
48+
project.lock.json
49+
project.fragment.lock.json
50+
artifacts/
51+
**/Properties/launchSettings.json
52+
53+
*_i.c
54+
*_p.c
55+
*_i.h
56+
*.ilk
57+
*.meta
58+
*.obj
59+
*.pch
60+
*.pdb
61+
*.pgc
62+
*.pgd
63+
*.sbr
64+
*.tlb
65+
*.tli
66+
*.tlh
67+
*.tmp
68+
*.tmp_proj
69+
*.log
70+
*.vspscc
71+
*.vssscc
72+
.builds
73+
*.pidb
74+
*.svclog
75+
*.scc
76+
77+
# Chutzpah Test files
78+
_Chutzpah*
79+
80+
# Visual C++ cache files
81+
ipch/
82+
*.aps
83+
*.ncb
84+
*.opendb
85+
*.opensdf
86+
#*.sdf
87+
*.cachefile
88+
*.VC.db
89+
*.VC.VC.opendb
90+
91+
# Visual Studio profiler
92+
*.psess
93+
*.vsp
94+
*.vspx
95+
*.sap
96+
97+
# TFS 2012 Local Workspace
98+
$tf/
99+
100+
# Guidance Automation Toolkit
101+
*.gpState
102+
103+
# ReSharper is a .NET coding add-in
104+
_ReSharper*/
105+
*.[Rr]e[Ss]harper
106+
*.DotSettings.user
107+
108+
# JustCode is a .NET coding add-in
109+
.JustCode
110+
111+
# TeamCity is a build add-in
112+
_TeamCity*
113+
114+
# DotCover is a Code Coverage Tool
115+
*.dotCover
116+
117+
# AxoCover is a Code Coverage Tool
118+
.axoCover/*
119+
!.axoCover/settings.json
120+
121+
# Visual Studio code coverage results
122+
*.coverage
123+
*.coveragexml
124+
125+
# NCrunch
126+
_NCrunch_*
127+
.*crunch*.local.xml
128+
nCrunchTemp_*
129+
130+
# MightyMoose
131+
*.mm.*
132+
AutoTest.Net/
133+
134+
# Web workbench (sass)
135+
.sass-cache/
136+
137+
# Installshield output folder
138+
[Ee]xpress/
139+
140+
# DocProject is a documentation generator add-in
141+
DocProject/buildhelp/
142+
DocProject/Help/*.HxT
143+
DocProject/Help/*.HxC
144+
DocProject/Help/*.hhc
145+
DocProject/Help/*.hhk
146+
DocProject/Help/*.hhp
147+
DocProject/Help/Html2
148+
DocProject/Help/html
149+
150+
# Click-Once directory
151+
publish/
152+
153+
# Publish Web Output
154+
*.[Pp]ublish.xml
155+
*.azurePubxml
156+
# Note: Comment the next line if you want to checkin your web deploy settings,
157+
# but database connection strings (with potential passwords) will be unencrypted
158+
*.pubxml
159+
*.publishproj
160+
161+
# Microsoft Azure Web App publish settings. Comment the next line if you want to
162+
# checkin your Azure Web App publish settings, but sensitive information contained
163+
# in these scripts will be unencrypted
164+
PublishScripts/
165+
166+
# NuGet Packages
167+
*.nupkg
168+
# The packages folder can be ignored because of Package Restore
169+
**/packages/*
170+
# except build/, which is used as an MSBuild target.
171+
!**/packages/build/
172+
# Uncomment if necessary however generally it will be regenerated when needed
173+
#!**/packages/repositories.config
174+
# NuGet v3's project.json files produces more ignorable files
175+
*.nuget.props
176+
*.nuget.targets
177+
178+
# Microsoft Azure Build Output
179+
csx/
180+
*.build.csdef
181+
182+
# Microsoft Azure Emulator
183+
ecf/
184+
rcf/
185+
186+
# Windows Store app package directories and files
187+
AppPackages/
188+
BundleArtifacts/
189+
Package.StoreAssociation.xml
190+
_pkginfo.txt
191+
*.appx
192+
193+
# Visual Studio cache files
194+
# files ending in .cache can be ignored
195+
*.[Cc]ache
196+
# but keep track of directories ending in .cache
197+
!*.[Cc]ache/
198+
199+
# Others
200+
ClientBin/
201+
~$*
202+
*~
203+
*.dbmdl
204+
*.dbproj.schemaview
205+
*.jfm
206+
*.pfx
207+
*.publishsettings
208+
orleans.codegen.cs
209+
210+
# Since there are multiple workflows, uncomment next line to ignore bower_components
211+
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
212+
#bower_components/
213+
214+
# RIA/Silverlight projects
215+
Generated_Code/
216+
217+
# Backup & report files from converting an old project file
218+
# to a newer Visual Studio version. Backup files are not needed,
219+
# because we have git ;-)
220+
_UpgradeReport_Files/
221+
Backup*/
222+
UpgradeLog*.XML
223+
UpgradeLog*.htm
224+
225+
# SQL Server files
226+
#*.mdf
227+
#*.ldf
228+
#*.ndf
229+
230+
# Business Intelligence projects
231+
*.rdl.data
232+
*.bim.layout
233+
*.bim_*.settings
234+
235+
# Microsoft Fakes
236+
FakesAssemblies/
237+
238+
# GhostDoc plugin setting file
239+
*.GhostDoc.xml
240+
241+
# Node.js Tools for Visual Studio
242+
.ntvs_analysis.dat
243+
node_modules/
244+
245+
# Typescript v1 declaration files
246+
typings/
247+
248+
# Visual Studio 6 build log
249+
*.plg
250+
251+
# Visual Studio 6 workspace options file
252+
*.opt
253+
254+
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
255+
*.vbw
256+
257+
# Visual Studio LightSwitch build output
258+
**/*.HTMLClient/GeneratedArtifacts
259+
**/*.DesktopClient/GeneratedArtifacts
260+
**/*.DesktopClient/ModelManifest.xml
261+
**/*.Server/GeneratedArtifacts
262+
**/*.Server/ModelManifest.xml
263+
_Pvt_Extensions
264+
265+
# Paket dependency manager
266+
.paket/paket.exe
267+
paket-files/
268+
269+
# FAKE - F# Make
270+
.fake/
271+
272+
# JetBrains Rider
273+
.idea/
274+
*.sln.iml
275+
276+
# CodeRush
277+
.cr/
278+
279+
# Python Tools for Visual Studio (PTVS)
280+
__pycache__/
281+
*.pyc
282+
283+
# Cake - Uncomment if you are using it
284+
# tools/**
285+
# !tools/packages.config
286+
287+
# Tabs Studio
288+
*.tss
289+
290+
# Telerik's JustMock configuration file
291+
*.jmconfig
292+
293+
# BizTalk build output
294+
*.btp.cs
295+
*.btm.cs
296+
*.odx.cs
297+
*.xsd.cs

CS/EFDataSourceSnippets/App.Config

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<configSections>
4+
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
5+
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
6+
</configSections>
7+
<connectionStrings>
8+
<add name="NorthwindEntities" connectionString="metadata=res://*/NwindEntities.csdl|res://*/NwindEntities.ssdl|res://*/NwindEntities.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=BLACKBOX;initial catalog=Northwind;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
9+
</connectionStrings>
10+
<entityFramework>
11+
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
12+
<providers>
13+
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
14+
</providers>
15+
</entityFramework>
16+
</configuration>

CS/EFDataSourceSnippets/Category.cs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
//------------------------------------------------------------------------------
2+
// <auto-generated>
3+
// This code was generated from a template.
4+
//
5+
// Manual changes to this file may cause unexpected behavior in your application.
6+
// Manual changes to this file will be overwritten if the code is regenerated.
7+
// </auto-generated>
8+
//------------------------------------------------------------------------------
9+
10+
namespace EFDataSourceSnippets
11+
{
12+
using System;
13+
using System.Collections.Generic;
14+
15+
public partial class Category
16+
{
17+
public int CategoryID { get; set; }
18+
public string CategoryName { get; set; }
19+
public string Description { get; set; }
20+
public byte[] Picture { get; set; }
21+
}
22+
}

CS/EFDataSourceSnippets/Code.cs

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
using DevExpress.DataAccess.EntityFramework;
7+
8+
namespace EFDataSourceSnippets
9+
{
10+
public class Test
11+
{
12+
EFDataSource DataSource { get; set; }
13+
public Test()
14+
{
15+
DataSource = InitializeEFDataSource();
16+
}
17+
EFDataSource InitializeEFDataSource()
18+
{
19+
return GenerateEFDataSource();
20+
}
21+
const string connectionString = "Data Source=localhost;Initial Catalog=Northwind;Persist Security Info=True;User ID=sa;Password=pwd;MultipleActiveResultSets=True;Application Name=EntityFramework";
22+
private EFDataSource GenerateEFDataSource()
23+
{
24+
var connectionParameters = new DevExpress.DataAccess.EntityFramework.EFConnectionParameters(typeof(NorthwindEntities), "EntityConnection", connectionString);
25+
var efDataSource = new DevExpress.DataAccess.EntityFramework.EFDataSource(connectionParameters);
26+
27+
((System.ComponentModel.ISupportInitialize)(efDataSource)).BeginInit();
28+
efDataSource.StoredProcedures.Add(GetStoredProcedure());
29+
((System.ComponentModel.ISupportInitialize)(efDataSource)).EndInit();
30+
return efDataSource;
31+
}
32+
private EFStoredProcedureInfo GetStoredProcedure()
33+
{
34+
var efParameter1 = new DevExpress.DataAccess.EntityFramework.EFParameter("CustomerID", typeof(string), "ALFKI");
35+
var efStoredProc = new DevExpress.DataAccess.EntityFramework.EFStoredProcedureInfo("CustOrderHist", new[] { efParameter1 });
36+
return efStoredProc;
37+
}
38+
}
39+
}

0 commit comments

Comments
 (0)