Simplify persistence. Embrace scalability. Build the future.
CloudStorageORM is a lightweight and powerful library that enables developers to use cloud storage (Azure Blob Storage, AWS S3, Google Cloud Storage) as a reliable and scalable data source through Entity Framework.
Built with .NET 8, following Clean Architecture and SOLID principles, it empowers small and medium applications to focus on business logic while reducing the complexity of managing traditional databases.
- βοΈ Use Azure Blob Storage, AWS S3, or Google Cloud Storage as your database
- π οΈ Builder Pattern and Clean Architecture ready
- π₯ Full Unit Test coverage using xUnit, Shouldly, and Moq
- π Optimized for scalability, reliability, and concurrency control
- π Available on NuGet for easy installation
- π― Built with .NET 8 and Entity Framework integration in mind
Install via CLI:
dotnet add package CloudStorageORM --version 1.0.7
Or search for CloudStorageORM
in the NuGet Package Manager inside Visual Studio.
Start by configuring your cloud storage provider:
var options = new CloudStorageOptions
{
Provider = CloudProvider.Azure,
ConnectionString = "UseDevelopmentStorage=true",
ContainerName = "sampleapp-container"
};
var storageProvider = new AzureBlobStorageProvider(options);
var context = new CloudStorageDbContext(options, storageProvider);
var users = await context.Set<User>().ToListAsync();
using CloudStorageORM.DbContext;
using CloudStorageORM.Enums;
using CloudStorageORM.Options;
using CloudStorageORM.StorageProviders;
var options = new CloudStorageOptions
{
Provider = CloudProvider.Azure,
ConnectionString = "UseDevelopmentStorage=true", // Azurite local emulator or real Azure
ContainerName = "sampleapp-container"
};
var storageProvider = new AzureBlobStorageProvider(options);
var context = new CloudStorageDbContext(options, storageProvider);
var repository = context.Set<User>();
var userId = Guid.NewGuid().ToString();
// β Create
await repository.AddAsync(userId, new User
{
Id = userId,
Name = "John Doe",
Email = "[email protected]"
});
// π List
var users = await repository.ListAsync();
foreach (var user in users)
{
Console.WriteLine($"{user.Id}: {user.Name} ({user.Email})");
}
// βοΈ Update
var updatedUser = new User
{
Id = userId,
Name = "John Doe Updated",
Email = "[email protected]"
};
await repository.UpdateAsync(userId, updatedUser);
// π Find
var foundUser = await repository.FindAsync(userId);
Console.WriteLine($"Found: {foundUser?.Id} - {foundUser?.Name} ({foundUser?.Email})");
// ποΈ Delete
await repository.RemoveAsync(userId);
// π List after deletion
var usersAfterDelete = await repository.ListAsync();
Console.WriteLine($"Remaining users: {usersAfterDelete.Count}");
π Full examples and extended documentation are coming soon!
CloudStorageORM uses Azurite to simulate Azure Blob Storage locally for unit testing.
See Testing with Azurite to configure your local environment.
This project is licensed under the GNU General Public License v3.0 (GPL-3.0-only).
Commercial use without prior authorization is not allowed.
See the LICENSE file for more information.
We welcome contributions from the community! π
If you'd like to help, please read our Contributing Guidelines and Pull Request Template.
Thank you for helping make CloudStorageORM even better!
"CloudStorageORM empowers developers to move faster, scale smarter, and build stronger applications by leveraging the true power of cloud storage." π