-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Initial work on the SQLite hosting integration * Adding sqlite client integration * Adding an extended default timeout when using the web container to avoid locking issues * Implementing ef client for sqlite Also, finally figured out why db was getting read-only errors, need to set unix file system permissions explicitly% * sqlite hosting tests * Implementing tests for sqlite client integration * Reverting accidentally enabling tests * Adding sqlite ef test set * Adding readme's for integrations Also decided to rename the method to AddSqliteConnection to be clearer as to what you're adding * Initial work on the SQLite hosting integration * Adding sqlite client integration * Adding an extended default timeout when using the web container to avoid locking issues * Implementing ef client for sqlite Also, finally figured out why db was getting read-only errors, need to set unix file system permissions explicitly% * sqlite hosting tests * Implementing tests for sqlite client integration * Reverting accidentally enabling tests * Adding sqlite ef test set * Adding readme's for integrations Also decided to rename the method to AddSqliteConnection to be clearer as to what you're adding * Applying code review feedback * Initial work on the SQLite hosting integration * Adding sqlite client integration * Adding an extended default timeout when using the web container to avoid locking issues * Implementing ef client for sqlite Also, finally figured out why db was getting read-only errors, need to set unix file system permissions explicitly% * sqlite hosting tests * Implementing tests for sqlite client integration * Reverting accidentally enabling tests * Adding sqlite ef test set * Adding readme's for integrations Also decided to rename the method to AddSqliteConnection to be clearer as to what you're adding * Initial work on the SQLite hosting integration * Adding sqlite client integration * Adding an extended default timeout when using the web container to avoid locking issues * Implementing ef client for sqlite Also, finally figured out why db was getting read-only errors, need to set unix file system permissions explicitly% * sqlite hosting tests * Implementing tests for sqlite client integration * Reverting accidentally enabling tests * Adding sqlite ef test set * Adding readme's for integrations Also decided to rename the method to AddSqliteConnection to be clearer as to what you're adding * Applying code review feedback * Update src/CommunityToolkit.Aspire.Hosting.Sqlite/CommunityToolkit.Aspire.Hosting.Sqlite.csproj Co-authored-by: Alireza Baloochi <[email protected]> * Updating readme --------- Co-authored-by: Alireza Baloochi <[email protected]>
- Loading branch information
1 parent
c50a1bd
commit 3994771
Showing
52 changed files
with
1,989 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
examples/sqlite/CommunityToolkit.Aspire.Sqlite.Api/BloggingContext.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using Microsoft.EntityFrameworkCore; | ||
|
||
namespace CommunityToolkit.Aspire.Sqlite.Api; | ||
|
||
public class BloggingContext(DbContextOptions<BloggingContext> options) : DbContext(options) | ||
{ | ||
public DbSet<Blog> Blogs { get; set; } | ||
public DbSet<Post> Posts { get; set; } | ||
} | ||
|
||
public class Blog | ||
{ | ||
public int BlogId { get; set; } | ||
public required string Url { get; set; } | ||
|
||
public List<Post> Posts { get; } = new(); | ||
} | ||
|
||
public class Post | ||
{ | ||
public int PostId { get; set; } | ||
public required string Title { get; set; } | ||
public required string Content { get; set; } | ||
|
||
public int BlogId { get; set; } | ||
public Blog? Blog { get; set; } | ||
} |
16 changes: 16 additions & 0 deletions
16
examples/sqlite/CommunityToolkit.Aspire.Sqlite.Api/CommunityToolkit.Aspire.Sqlite.Api.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.Web"> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="../../../src/CommunityToolkit.Aspire.Microsoft.Data.Sqlite/CommunityToolkit.Aspire.Microsoft.Data.Sqlite.csproj" /> | ||
<ProjectReference Include="../../../src/CommunityToolkit.Aspire.Microsoft.EntityFrameworkCore.Sqlite/CommunityToolkit.Aspire.Microsoft.EntityFrameworkCore.Sqlite.csproj" /> | ||
<ProjectReference Include="../CommunityToolkit.Aspire.Sqlite.ServiceDefaults/CommunityToolkit.Aspire.Sqlite.ServiceDefaults.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design"> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
<PrivateAssets>all</PrivateAssets> | ||
</PackageReference> | ||
</ItemGroup> | ||
|
||
</Project> |
79 changes: 79 additions & 0 deletions
79
...te/CommunityToolkit.Aspire.Sqlite.Api/Migrations/20250107054253_InitialCreate.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.