├── functions-csharp-entityframeworkcore ├── host.json ├── local.settings.json.sample ├── Startup.cs ├── Models.cs ├── functions-csharp-entityframeworkcore.csproj ├── Migrations │ ├── 20190526041654_InitialCreate.cs │ ├── BloggingContextModelSnapshot.cs │ └── 20190526041654_InitialCreate.Designer.cs ├── HttpTrigger.cs └── .gitignore ├── README.md ├── functions-csharp-entityframeworkcore.sln ├── .gitattributes └── .gitignore /functions-csharp-entityframeworkcore/host.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0" 3 | } -------------------------------------------------------------------------------- /functions-csharp-entityframeworkcore/local.settings.json.sample: -------------------------------------------------------------------------------- 1 | { 2 | "IsEncrypted": false, 3 | "Values": { 4 | "AzureWebJobsStorage": "UseDevelopmentStorage=true", 5 | "FUNCTIONS_WORKER_RUNTIME": "dotnet", 6 | "SqlConnectionString": "{sql-connection-string}" 7 | } 8 | } -------------------------------------------------------------------------------- /functions-csharp-entityframeworkcore/Startup.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Azure.Functions.Extensions.DependencyInjection; 2 | using Microsoft.EntityFrameworkCore; 3 | using Microsoft.Extensions.DependencyInjection; 4 | using System; 5 | 6 | [assembly: FunctionsStartup(typeof(functions_csharp_entityframeworkcore.Startup))] 7 | 8 | namespace functions_csharp_entityframeworkcore 9 | { 10 | class Startup : FunctionsStartup 11 | { 12 | public override void Configure(IFunctionsHostBuilder builder) 13 | { 14 | string SqlConnection = Environment.GetEnvironmentVariable("SqlConnectionString"); 15 | builder.Services.AddDbContext( 16 | options => options.UseSqlServer(SqlConnection)); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Interested in .NET 5? 2 | 3 | Link to a sample using Entity Framework 5 in Azure Functions: https://github.com/jeffhollan/functions-net5-entityframework 4 | 5 | # .NET Core Entity Framework and functions 6 | 7 | C# Function that uses dependency injection and entity framework core with Azure SQL. A few things of note: 8 | 9 | I want to use design-first migration, so I created a `IDesignTimeDbContextFactory` for the tooling to generate the right `DbContext`. 10 | 11 | I also had to add a post-build step to the `.csproj` file to make sure the `.dll` for the project is where the entity framework tooling expected: 12 | 13 | ```xml 14 | 15 | 16 | 17 | ``` 18 | -------------------------------------------------------------------------------- /functions-csharp-entityframeworkcore.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.28917.182 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "functions-csharp-entityframeworkcore", "functions-csharp-entityframeworkcore\functions-csharp-entityframeworkcore.csproj", "{2017F2DF-A2A8-4FC7-BC8C-E6AFCE95BE8B}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {2017F2DF-A2A8-4FC7-BC8C-E6AFCE95BE8B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {2017F2DF-A2A8-4FC7-BC8C-E6AFCE95BE8B}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {2017F2DF-A2A8-4FC7-BC8C-E6AFCE95BE8B}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {2017F2DF-A2A8-4FC7-BC8C-E6AFCE95BE8B}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {57B02CBD-502A-430C-B5A9-719FDBDC8A97} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /functions-csharp-entityframeworkcore/Models.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | using Microsoft.EntityFrameworkCore.Design; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | 7 | namespace functions_csharp_entityframeworkcore 8 | { 9 | public class BloggingContext : DbContext 10 | { 11 | public BloggingContext(DbContextOptions options) 12 | : base(options) 13 | { } 14 | 15 | public DbSet Blogs { get; set; } 16 | public DbSet Posts { get; set; } 17 | } 18 | 19 | public class Blog 20 | { 21 | public int BlogId { get; set; } 22 | public string Url { get; set; } 23 | 24 | public ICollection Posts { get; set; } 25 | } 26 | 27 | public class Post 28 | { 29 | public int PostId { get; set; } 30 | public string Title { get; set; } 31 | public string Content { get; set; } 32 | 33 | public int BlogId { get; set; } 34 | public Blog Blog { get; set; } 35 | } 36 | 37 | public class BloggingContextFactory : IDesignTimeDbContextFactory 38 | { 39 | public BloggingContext CreateDbContext(string[] args) 40 | { 41 | var optionsBuilder = new DbContextOptionsBuilder(); 42 | optionsBuilder.UseSqlServer(Environment.GetEnvironmentVariable("SqlConnectionString")); 43 | 44 | return new BloggingContext(optionsBuilder.Options); 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /functions-csharp-entityframeworkcore/functions-csharp-entityframeworkcore.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | netcoreapp2.1 4 | v2 5 | functions_csharp_entityframeworkcore 6 | 7 | 8 | 9 | 10 | 11 | 12 | all 13 | runtime; build; native; contentfiles; analyzers; buildtransitive 14 | 15 | 16 | 17 | 18 | 19 | PreserveNewest 20 | 21 | 22 | PreserveNewest 23 | Never 24 | 25 | 26 | PreserveNewest 27 | Never 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /functions-csharp-entityframeworkcore/Migrations/20190526041654_InitialCreate.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore.Metadata; 2 | using Microsoft.EntityFrameworkCore.Migrations; 3 | 4 | namespace functions_csharp_entityframeworkcore.Migrations 5 | { 6 | public partial class InitialCreate : Migration 7 | { 8 | protected override void Up(MigrationBuilder migrationBuilder) 9 | { 10 | migrationBuilder.CreateTable( 11 | name: "Blogs", 12 | columns: table => new 13 | { 14 | BlogId = table.Column(nullable: false) 15 | .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), 16 | Url = table.Column(nullable: true) 17 | }, 18 | constraints: table => 19 | { 20 | table.PrimaryKey("PK_Blogs", x => x.BlogId); 21 | }); 22 | 23 | migrationBuilder.CreateTable( 24 | name: "Posts", 25 | columns: table => new 26 | { 27 | PostId = table.Column(nullable: false) 28 | .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn), 29 | Title = table.Column(nullable: true), 30 | Content = table.Column(nullable: true), 31 | BlogId = table.Column(nullable: false) 32 | }, 33 | constraints: table => 34 | { 35 | table.PrimaryKey("PK_Posts", x => x.PostId); 36 | table.ForeignKey( 37 | name: "FK_Posts_Blogs_BlogId", 38 | column: x => x.BlogId, 39 | principalTable: "Blogs", 40 | principalColumn: "BlogId", 41 | onDelete: ReferentialAction.Cascade); 42 | }); 43 | 44 | migrationBuilder.CreateIndex( 45 | name: "IX_Posts_BlogId", 46 | table: "Posts", 47 | column: "BlogId"); 48 | } 49 | 50 | protected override void Down(MigrationBuilder migrationBuilder) 51 | { 52 | migrationBuilder.DropTable( 53 | name: "Posts"); 54 | 55 | migrationBuilder.DropTable( 56 | name: "Blogs"); 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /functions-csharp-entityframeworkcore/Migrations/BloggingContextModelSnapshot.cs: -------------------------------------------------------------------------------- 1 | // 2 | using Microsoft.EntityFrameworkCore; 3 | using Microsoft.EntityFrameworkCore.Infrastructure; 4 | using Microsoft.EntityFrameworkCore.Metadata; 5 | using Microsoft.EntityFrameworkCore.Storage.ValueConversion; 6 | using functions_csharp_entityframeworkcore; 7 | 8 | namespace functions_csharp_entityframeworkcore.Migrations 9 | { 10 | [DbContext(typeof(BloggingContext))] 11 | partial class BloggingContextModelSnapshot : ModelSnapshot 12 | { 13 | protected override void BuildModel(ModelBuilder modelBuilder) 14 | { 15 | #pragma warning disable 612, 618 16 | modelBuilder 17 | .HasAnnotation("ProductVersion", "2.2.3-servicing-35854") 18 | .HasAnnotation("Relational:MaxIdentifierLength", 128) 19 | .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); 20 | 21 | modelBuilder.Entity("functions_csharp_entityframeworkcore.Blog", b => 22 | { 23 | b.Property("BlogId") 24 | .ValueGeneratedOnAdd() 25 | .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); 26 | 27 | b.Property("Url"); 28 | 29 | b.HasKey("BlogId"); 30 | 31 | b.ToTable("Blogs"); 32 | }); 33 | 34 | modelBuilder.Entity("functions_csharp_entityframeworkcore.Post", b => 35 | { 36 | b.Property("PostId") 37 | .ValueGeneratedOnAdd() 38 | .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); 39 | 40 | b.Property("BlogId"); 41 | 42 | b.Property("Content"); 43 | 44 | b.Property("Title"); 45 | 46 | b.HasKey("PostId"); 47 | 48 | b.HasIndex("BlogId"); 49 | 50 | b.ToTable("Posts"); 51 | }); 52 | 53 | modelBuilder.Entity("functions_csharp_entityframeworkcore.Post", b => 54 | { 55 | b.HasOne("functions_csharp_entityframeworkcore.Blog", "Blog") 56 | .WithMany("Posts") 57 | .HasForeignKey("BlogId") 58 | .OnDelete(DeleteBehavior.Cascade); 59 | }); 60 | #pragma warning restore 612, 618 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /functions-csharp-entityframeworkcore/Migrations/20190526041654_InitialCreate.Designer.cs: -------------------------------------------------------------------------------- 1 | // 2 | using Microsoft.EntityFrameworkCore; 3 | using Microsoft.EntityFrameworkCore.Infrastructure; 4 | using Microsoft.EntityFrameworkCore.Metadata; 5 | using Microsoft.EntityFrameworkCore.Migrations; 6 | using Microsoft.EntityFrameworkCore.Storage.ValueConversion; 7 | using functions_csharp_entityframeworkcore; 8 | 9 | namespace functions_csharp_entityframeworkcore.Migrations 10 | { 11 | [DbContext(typeof(BloggingContext))] 12 | [Migration("20190526041654_InitialCreate")] 13 | partial class InitialCreate 14 | { 15 | protected override void BuildTargetModel(ModelBuilder modelBuilder) 16 | { 17 | #pragma warning disable 612, 618 18 | modelBuilder 19 | .HasAnnotation("ProductVersion", "2.2.3-servicing-35854") 20 | .HasAnnotation("Relational:MaxIdentifierLength", 128) 21 | .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); 22 | 23 | modelBuilder.Entity("functions_csharp_entityframeworkcore.Blog", b => 24 | { 25 | b.Property("BlogId") 26 | .ValueGeneratedOnAdd() 27 | .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); 28 | 29 | b.Property("Url"); 30 | 31 | b.HasKey("BlogId"); 32 | 33 | b.ToTable("Blogs"); 34 | }); 35 | 36 | modelBuilder.Entity("functions_csharp_entityframeworkcore.Post", b => 37 | { 38 | b.Property("PostId") 39 | .ValueGeneratedOnAdd() 40 | .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); 41 | 42 | b.Property("BlogId"); 43 | 44 | b.Property("Content"); 45 | 46 | b.Property("Title"); 47 | 48 | b.HasKey("PostId"); 49 | 50 | b.HasIndex("BlogId"); 51 | 52 | b.ToTable("Posts"); 53 | }); 54 | 55 | modelBuilder.Entity("functions_csharp_entityframeworkcore.Post", b => 56 | { 57 | b.HasOne("functions_csharp_entityframeworkcore.Blog", "Blog") 58 | .WithMany("Posts") 59 | .HasForeignKey("BlogId") 60 | .OnDelete(DeleteBehavior.Cascade); 61 | }); 62 | #pragma warning restore 612, 618 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /functions-csharp-entityframeworkcore/HttpTrigger.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using Microsoft.AspNetCore.Mvc; 3 | using Microsoft.Azure.WebJobs; 4 | using Microsoft.Azure.WebJobs.Extensions.Http; 5 | using Microsoft.AspNetCore.Http; 6 | using Microsoft.Extensions.Logging; 7 | using System.Linq; 8 | using System; 9 | using System.Threading; 10 | using Newtonsoft.Json; 11 | using System.IO; 12 | 13 | namespace functions_csharp_entityframeworkcore 14 | { 15 | public class HttpTrigger 16 | { 17 | private readonly BloggingContext _context; 18 | public HttpTrigger(BloggingContext context) 19 | { 20 | _context = context; 21 | } 22 | 23 | [FunctionName("GetPosts")] 24 | public IActionResult GetPosts( 25 | [HttpTrigger(AuthorizationLevel.Function, "get", Route = "posts")] HttpRequest req, 26 | ILogger log) 27 | { 28 | log.LogInformation("C# HTTP GET/posts trigger function processed a request."); 29 | 30 | var postsArray = _context.Posts.OrderBy(p => p.Title).ToArray(); 31 | return new OkObjectResult(postsArray); 32 | } 33 | 34 | [FunctionName("PostPost")] 35 | public async Task PostPostAsync( 36 | [HttpTrigger(AuthorizationLevel.Function, "post", Route = "blog/{blogId}/post")] HttpRequest req, 37 | int blogId, 38 | CancellationToken cts, 39 | ILogger log) 40 | { 41 | log.LogInformation("C# HTTP POST/post trigger function processed a request."); 42 | 43 | string requestBody = await new StreamReader(req.Body).ReadToEndAsync(); 44 | Post data = JsonConvert.DeserializeObject(requestBody); 45 | 46 | Post p = new Post 47 | { 48 | BlogId = blogId, 49 | Content = data.Content, 50 | Title = data.Title 51 | }; 52 | var entity = await _context.Posts.AddAsync(p, cts); 53 | await _context.SaveChangesAsync(cts); 54 | return new OkObjectResult(JsonConvert.SerializeObject(entity.Entity)); 55 | } 56 | 57 | [FunctionName("PostBlog")] 58 | public async Task PostBlogAsync( 59 | [HttpTrigger(AuthorizationLevel.Function, "post", Route = "blog")] HttpRequest req, 60 | CancellationToken cts, 61 | ILogger log) 62 | { 63 | log.LogInformation("C# HTTP POST/blog trigger function processed a request."); 64 | 65 | var entity = await _context.Blogs.AddAsync(new Blog(), cts); 66 | await _context.SaveChangesAsync(cts); 67 | return new OkObjectResult(JsonConvert.SerializeObject(entity.Entity)); 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /functions-csharp-entityframeworkcore/.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # Azure Functions localsettings file 5 | local.settings.json 6 | 7 | # User-specific files 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Build results 17 | [Dd]ebug/ 18 | [Dd]ebugPublic/ 19 | [Rr]elease/ 20 | [Rr]eleases/ 21 | x64/ 22 | x86/ 23 | bld/ 24 | [Bb]in/ 25 | [Oo]bj/ 26 | [Ll]og/ 27 | 28 | # Visual Studio 2015 cache/options directory 29 | .vs/ 30 | # Uncomment if you have tasks that create the project's static files in wwwroot 31 | #wwwroot/ 32 | 33 | # MSTest test Results 34 | [Tt]est[Rr]esult*/ 35 | [Bb]uild[Ll]og.* 36 | 37 | # NUNIT 38 | *.VisualState.xml 39 | TestResult.xml 40 | 41 | # Build Results of an ATL Project 42 | [Dd]ebugPS/ 43 | [Rr]eleasePS/ 44 | dlldata.c 45 | 46 | # DNX 47 | project.lock.json 48 | project.fragment.lock.json 49 | artifacts/ 50 | 51 | *_i.c 52 | *_p.c 53 | *_i.h 54 | *.ilk 55 | *.meta 56 | *.obj 57 | *.pch 58 | *.pdb 59 | *.pgc 60 | *.pgd 61 | *.rsp 62 | *.sbr 63 | *.tlb 64 | *.tli 65 | *.tlh 66 | *.tmp 67 | *.tmp_proj 68 | *.log 69 | *.vspscc 70 | *.vssscc 71 | .builds 72 | *.pidb 73 | *.svclog 74 | *.scc 75 | 76 | # Chutzpah Test files 77 | _Chutzpah* 78 | 79 | # Visual C++ cache files 80 | ipch/ 81 | *.aps 82 | *.ncb 83 | *.opendb 84 | *.opensdf 85 | *.sdf 86 | *.cachefile 87 | *.VC.db 88 | *.VC.VC.opendb 89 | 90 | # Visual Studio profiler 91 | *.psess 92 | *.vsp 93 | *.vspx 94 | *.sap 95 | 96 | # TFS 2012 Local Workspace 97 | $tf/ 98 | 99 | # Guidance Automation Toolkit 100 | *.gpState 101 | 102 | # ReSharper is a .NET coding add-in 103 | _ReSharper*/ 104 | *.[Rr]e[Ss]harper 105 | *.DotSettings.user 106 | 107 | # JustCode is a .NET coding add-in 108 | .JustCode 109 | 110 | # TeamCity is a build add-in 111 | _TeamCity* 112 | 113 | # DotCover is a Code Coverage Tool 114 | *.dotCover 115 | 116 | # NCrunch 117 | _NCrunch_* 118 | .*crunch*.local.xml 119 | nCrunchTemp_* 120 | 121 | # MightyMoose 122 | *.mm.* 123 | AutoTest.Net/ 124 | 125 | # Web workbench (sass) 126 | .sass-cache/ 127 | 128 | # Installshield output folder 129 | [Ee]xpress/ 130 | 131 | # DocProject is a documentation generator add-in 132 | DocProject/buildhelp/ 133 | DocProject/Help/*.HxT 134 | DocProject/Help/*.HxC 135 | DocProject/Help/*.hhc 136 | DocProject/Help/*.hhk 137 | DocProject/Help/*.hhp 138 | DocProject/Help/Html2 139 | DocProject/Help/html 140 | 141 | # Click-Once directory 142 | publish/ 143 | 144 | # Publish Web Output 145 | *.[Pp]ublish.xml 146 | *.azurePubxml 147 | # TODO: Comment the next line if you want to checkin your web deploy settings 148 | # but database connection strings (with potential passwords) will be unencrypted 149 | #*.pubxml 150 | *.publishproj 151 | 152 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 153 | # checkin your Azure Web App publish settings, but sensitive information contained 154 | # in these scripts will be unencrypted 155 | PublishScripts/ 156 | 157 | # NuGet Packages 158 | *.nupkg 159 | # The packages folder can be ignored because of Package Restore 160 | **/packages/* 161 | # except build/, which is used as an MSBuild target. 162 | !**/packages/build/ 163 | # Uncomment if necessary however generally it will be regenerated when needed 164 | #!**/packages/repositories.config 165 | # NuGet v3's project.json files produces more ignoreable files 166 | *.nuget.props 167 | *.nuget.targets 168 | 169 | # Microsoft Azure Build Output 170 | csx/ 171 | *.build.csdef 172 | 173 | # Microsoft Azure Emulator 174 | ecf/ 175 | rcf/ 176 | 177 | # Windows Store app package directories and files 178 | AppPackages/ 179 | BundleArtifacts/ 180 | Package.StoreAssociation.xml 181 | _pkginfo.txt 182 | 183 | # Visual Studio cache files 184 | # files ending in .cache can be ignored 185 | *.[Cc]ache 186 | # but keep track of directories ending in .cache 187 | !*.[Cc]ache/ 188 | 189 | # Others 190 | ClientBin/ 191 | ~$* 192 | *~ 193 | *.dbmdl 194 | *.dbproj.schemaview 195 | *.jfm 196 | *.pfx 197 | *.publishsettings 198 | node_modules/ 199 | orleans.codegen.cs 200 | 201 | # Since there are multiple workflows, uncomment next line to ignore bower_components 202 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 203 | #bower_components/ 204 | 205 | # RIA/Silverlight projects 206 | Generated_Code/ 207 | 208 | # Backup & report files from converting an old project file 209 | # to a newer Visual Studio version. Backup files are not needed, 210 | # because we have git ;-) 211 | _UpgradeReport_Files/ 212 | Backup*/ 213 | UpgradeLog*.XML 214 | UpgradeLog*.htm 215 | 216 | # SQL Server files 217 | *.mdf 218 | *.ldf 219 | 220 | # Business Intelligence projects 221 | *.rdl.data 222 | *.bim.layout 223 | *.bim_*.settings 224 | 225 | # Microsoft Fakes 226 | FakesAssemblies/ 227 | 228 | # GhostDoc plugin setting file 229 | *.GhostDoc.xml 230 | 231 | # Node.js Tools for Visual Studio 232 | .ntvs_analysis.dat 233 | 234 | # Visual Studio 6 build log 235 | *.plg 236 | 237 | # Visual Studio 6 workspace options file 238 | *.opt 239 | 240 | # Visual Studio LightSwitch build output 241 | **/*.HTMLClient/GeneratedArtifacts 242 | **/*.DesktopClient/GeneratedArtifacts 243 | **/*.DesktopClient/ModelManifest.xml 244 | **/*.Server/GeneratedArtifacts 245 | **/*.Server/ModelManifest.xml 246 | _Pvt_Extensions 247 | 248 | # Paket dependency manager 249 | .paket/paket.exe 250 | paket-files/ 251 | 252 | # FAKE - F# Make 253 | .fake/ 254 | 255 | # JetBrains Rider 256 | .idea/ 257 | *.sln.iml 258 | 259 | # CodeRush 260 | .cr/ 261 | 262 | # Python Tools for Visual Studio (PTVS) 263 | __pycache__/ 264 | *.pyc -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 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 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Build results 17 | [Dd]ebug/ 18 | [Dd]ebugPublic/ 19 | [Rr]elease/ 20 | [Rr]eleases/ 21 | x64/ 22 | x86/ 23 | [Aa][Rr][Mm]/ 24 | [Aa][Rr][Mm]64/ 25 | bld/ 26 | [Bb]in/ 27 | [Oo]bj/ 28 | [Ll]og/ 29 | 30 | # Visual Studio 2015/2017 cache/options directory 31 | .vs/ 32 | # Uncomment if you have tasks that create the project's static files in wwwroot 33 | #wwwroot/ 34 | 35 | # Visual Studio 2017 auto generated files 36 | Generated\ Files/ 37 | 38 | # MSTest test Results 39 | [Tt]est[Rr]esult*/ 40 | [Bb]uild[Ll]og.* 41 | 42 | # NUNIT 43 | *.VisualState.xml 44 | TestResult.xml 45 | 46 | # Build Results of an ATL Project 47 | [Dd]ebugPS/ 48 | [Rr]eleasePS/ 49 | dlldata.c 50 | 51 | # Benchmark Results 52 | BenchmarkDotNet.Artifacts/ 53 | 54 | # .NET Core 55 | project.lock.json 56 | project.fragment.lock.json 57 | artifacts/ 58 | 59 | # StyleCop 60 | StyleCopReport.xml 61 | 62 | # Files built by Visual Studio 63 | *_i.c 64 | *_p.c 65 | *_h.h 66 | *.ilk 67 | *.meta 68 | *.obj 69 | *.iobj 70 | *.pch 71 | *.pdb 72 | *.ipdb 73 | *.pgc 74 | *.pgd 75 | *.rsp 76 | *.sbr 77 | *.tlb 78 | *.tli 79 | *.tlh 80 | *.tmp 81 | *.tmp_proj 82 | *_wpftmp.csproj 83 | *.log 84 | *.vspscc 85 | *.vssscc 86 | .builds 87 | *.pidb 88 | *.svclog 89 | *.scc 90 | 91 | # Chutzpah Test files 92 | _Chutzpah* 93 | 94 | # Visual C++ cache files 95 | ipch/ 96 | *.aps 97 | *.ncb 98 | *.opendb 99 | *.opensdf 100 | *.sdf 101 | *.cachefile 102 | *.VC.db 103 | *.VC.VC.opendb 104 | 105 | # Visual Studio profiler 106 | *.psess 107 | *.vsp 108 | *.vspx 109 | *.sap 110 | 111 | # Visual Studio Trace Files 112 | *.e2e 113 | 114 | # TFS 2012 Local Workspace 115 | $tf/ 116 | 117 | # Guidance Automation Toolkit 118 | *.gpState 119 | 120 | # ReSharper is a .NET coding add-in 121 | _ReSharper*/ 122 | *.[Rr]e[Ss]harper 123 | *.DotSettings.user 124 | 125 | # JustCode is a .NET coding add-in 126 | .JustCode 127 | 128 | # TeamCity is a build add-in 129 | _TeamCity* 130 | 131 | # DotCover is a Code Coverage Tool 132 | *.dotCover 133 | 134 | # AxoCover is a Code Coverage Tool 135 | .axoCover/* 136 | !.axoCover/settings.json 137 | 138 | # Visual Studio code coverage results 139 | *.coverage 140 | *.coveragexml 141 | 142 | # NCrunch 143 | _NCrunch_* 144 | .*crunch*.local.xml 145 | nCrunchTemp_* 146 | 147 | # MightyMoose 148 | *.mm.* 149 | AutoTest.Net/ 150 | 151 | # Web workbench (sass) 152 | .sass-cache/ 153 | 154 | # Installshield output folder 155 | [Ee]xpress/ 156 | 157 | # DocProject is a documentation generator add-in 158 | DocProject/buildhelp/ 159 | DocProject/Help/*.HxT 160 | DocProject/Help/*.HxC 161 | DocProject/Help/*.hhc 162 | DocProject/Help/*.hhk 163 | DocProject/Help/*.hhp 164 | DocProject/Help/Html2 165 | DocProject/Help/html 166 | 167 | # Click-Once directory 168 | publish/ 169 | 170 | # Publish Web Output 171 | *.[Pp]ublish.xml 172 | *.azurePubxml 173 | # Note: Comment the next line if you want to checkin your web deploy settings, 174 | # but database connection strings (with potential passwords) will be unencrypted 175 | *.pubxml 176 | *.publishproj 177 | 178 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 179 | # checkin your Azure Web App publish settings, but sensitive information contained 180 | # in these scripts will be unencrypted 181 | PublishScripts/ 182 | 183 | # NuGet Packages 184 | *.nupkg 185 | # The packages folder can be ignored because of Package Restore 186 | **/[Pp]ackages/* 187 | # except build/, which is used as an MSBuild target. 188 | !**/[Pp]ackages/build/ 189 | # Uncomment if necessary however generally it will be regenerated when needed 190 | #!**/[Pp]ackages/repositories.config 191 | # NuGet v3's project.json files produces more ignorable files 192 | *.nuget.props 193 | *.nuget.targets 194 | 195 | # Microsoft Azure Build Output 196 | csx/ 197 | *.build.csdef 198 | 199 | # Microsoft Azure Emulator 200 | ecf/ 201 | rcf/ 202 | 203 | # Windows Store app package directories and files 204 | AppPackages/ 205 | BundleArtifacts/ 206 | Package.StoreAssociation.xml 207 | _pkginfo.txt 208 | *.appx 209 | 210 | # Visual Studio cache files 211 | # files ending in .cache can be ignored 212 | *.[Cc]ache 213 | # but keep track of directories ending in .cache 214 | !?*.[Cc]ache/ 215 | 216 | # Others 217 | ClientBin/ 218 | ~$* 219 | *~ 220 | *.dbmdl 221 | *.dbproj.schemaview 222 | *.jfm 223 | *.pfx 224 | *.publishsettings 225 | orleans.codegen.cs 226 | 227 | # Including strong name files can present a security risk 228 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 229 | #*.snk 230 | 231 | # Since there are multiple workflows, uncomment next line to ignore bower_components 232 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 233 | #bower_components/ 234 | 235 | # RIA/Silverlight projects 236 | Generated_Code/ 237 | 238 | # Backup & report files from converting an old project file 239 | # to a newer Visual Studio version. Backup files are not needed, 240 | # because we have git ;-) 241 | _UpgradeReport_Files/ 242 | Backup*/ 243 | UpgradeLog*.XML 244 | UpgradeLog*.htm 245 | ServiceFabricBackup/ 246 | *.rptproj.bak 247 | 248 | # SQL Server files 249 | *.mdf 250 | *.ldf 251 | *.ndf 252 | 253 | # Business Intelligence projects 254 | *.rdl.data 255 | *.bim.layout 256 | *.bim_*.settings 257 | *.rptproj.rsuser 258 | *- Backup*.rdl 259 | 260 | # Microsoft Fakes 261 | FakesAssemblies/ 262 | 263 | # GhostDoc plugin setting file 264 | *.GhostDoc.xml 265 | 266 | # Node.js Tools for Visual Studio 267 | .ntvs_analysis.dat 268 | node_modules/ 269 | 270 | # Visual Studio 6 build log 271 | *.plg 272 | 273 | # Visual Studio 6 workspace options file 274 | *.opt 275 | 276 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 277 | *.vbw 278 | 279 | # Visual Studio LightSwitch build output 280 | **/*.HTMLClient/GeneratedArtifacts 281 | **/*.DesktopClient/GeneratedArtifacts 282 | **/*.DesktopClient/ModelManifest.xml 283 | **/*.Server/GeneratedArtifacts 284 | **/*.Server/ModelManifest.xml 285 | _Pvt_Extensions 286 | 287 | # Paket dependency manager 288 | .paket/paket.exe 289 | paket-files/ 290 | 291 | # FAKE - F# Make 292 | .fake/ 293 | 294 | # JetBrains Rider 295 | .idea/ 296 | *.sln.iml 297 | 298 | # CodeRush personal settings 299 | .cr/personal 300 | 301 | # Python Tools for Visual Studio (PTVS) 302 | __pycache__/ 303 | *.pyc 304 | 305 | # Cake - Uncomment if you are using it 306 | # tools/** 307 | # !tools/packages.config 308 | 309 | # Tabs Studio 310 | *.tss 311 | 312 | # Telerik's JustMock configuration file 313 | *.jmconfig 314 | 315 | # BizTalk build output 316 | *.btp.cs 317 | *.btm.cs 318 | *.odx.cs 319 | *.xsd.cs 320 | 321 | # OpenCover UI analysis results 322 | OpenCover/ 323 | 324 | # Azure Stream Analytics local run output 325 | ASALocalRun/ 326 | 327 | # MSBuild Binary and Structured Log 328 | *.binlog 329 | 330 | # NVidia Nsight GPU debugger configuration file 331 | *.nvuser 332 | 333 | # MFractors (Xamarin productivity tool) working folder 334 | .mfractor/ 335 | 336 | # Local History for Visual Studio 337 | .localhistory/ 338 | 339 | # BeatPulse healthcheck temp database 340 | healthchecksdb --------------------------------------------------------------------------------