API updates for functional code

This commit is contained in:
programmingPug
2025-01-04 12:28:05 -05:00
parent a426dce05e
commit dd1196af84
44 changed files with 12280 additions and 5161 deletions

View File

@@ -0,0 +1,31 @@
namespace house_plant_api.Context
{
using house_plant_api.Models;
using Microsoft.EntityFrameworkCore;
public class AppDbContext : DbContext
{
public DbSet<Device> Devices { get; set; }
public AppDbContext(DbContextOptions<AppDbContext> options) : base(options) { }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
modelBuilder.Entity<Device>()
.HasKey(d => d.Id);
modelBuilder.Entity<Device>()
.Property(d => d.Name)
.IsRequired();
modelBuilder.Entity<Device>()
.Property(d => d.Nickname);
modelBuilder.Entity<Device>()
.Property(d => d.Uuid)
.IsRequired();
}
}
}

View File

@@ -0,0 +1,108 @@
namespace house_plant_api.Controllers
{
using house_plant_api.Context;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using System.Linq;
using System.Threading.Tasks;
[ApiController]
[Route("api/[controller]")]
public class DevicesController : ControllerBase
{
private readonly IDbContextFactory<AppDbContext> _dbContextFactory;
public DevicesController(IDbContextFactory<AppDbContext> dbContextFactory)
{
_dbContextFactory = dbContextFactory;
}
// GET: api/devices
[HttpGet]
public async Task<IActionResult> GetDevices()
{
using var dbContext = _dbContextFactory.CreateDbContext();
var devices = await dbContext.Devices.ToListAsync();
var result = devices.Select(d => new
{
d.Name,
d.Uuid,
d.Nickname,
Moisture = d.Moisture.HasValue ? $"{d.Moisture}%" : "N/A",
d.LastSeen
});
return Ok(result);
}
// GET: api/devices/{name}
[HttpGet("{name}")]
public async Task<IActionResult> GetDevice(string name)
{
using var dbContext = _dbContextFactory.CreateDbContext();
var device = await dbContext.Devices.FirstOrDefaultAsync(d => d.Name == name);
if (device == null)
return NotFound(new { Error = $"Device '{name}' not found." });
return Ok(new
{
device.Name,
device.Uuid,
device.Nickname,
Moisture = device.Moisture.HasValue ? $"{device.Moisture}%" : "N/A",
device.LastSeen
});
}
// DELETE: api/devices/{name}
[HttpDelete("{name}")]
public async Task<IActionResult> DeleteDevice(string name)
{
using var dbContext = _dbContextFactory.CreateDbContext();
var device = await dbContext.Devices.FirstOrDefaultAsync(d => d.Name == name);
if (device == null)
return NotFound(new { Error = $"Device '{name}' not found in database." });
dbContext.Devices.Remove(device);
await dbContext.SaveChangesAsync();
return Ok(new { Message = $"Device '{name}' removed successfully." });
}
// PUT: api/devices/{name}/nickname
[HttpPut("{name}/nickname")]
public async Task<IActionResult> UpdateNickname(string name, [FromBody] NicknameUpdateRequest request)
{
// Find the device by Name
using var dbContext = _dbContextFactory.CreateDbContext();
var device = await dbContext.Devices.FirstOrDefaultAsync(d => d.Name == name);
if (device == null)
{
return NotFound(new { Error = $"Device '{name}' not found." });
}
// Update the Nickname
device.Nickname = request.Nickname;
// Save changes
dbContext.Devices.Update(device);
await dbContext.SaveChangesAsync();
return Ok(new
{
Message = $"Nickname updated successfully for device '{name}'.",
Nickname = device.Nickname
});
}
}
// A simple DTO (Data Transfer Object) for updating the nickname
public class NicknameUpdateRequest
{
public string Nickname { get; set; }
}
}

View File

@@ -1,33 +0,0 @@
using Microsoft.AspNetCore.Mvc;
namespace house_plant_api.Controllers
{
[ApiController]
[Route("[controller]")]
public class WeatherForecastController : ControllerBase
{
private static readonly string[] Summaries = new[]
{
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
};
private readonly ILogger<WeatherForecastController> _logger;
public WeatherForecastController(ILogger<WeatherForecastController> logger)
{
_logger = logger;
}
[HttpGet(Name = "GetWeatherForecast")]
public IEnumerable<WeatherForecast> Get()
{
return Enumerable.Range(1, 5).Select(index => new WeatherForecast
{
Date = DateTime.Now.AddDays(index),
TemperatureC = Random.Shared.Next(-20, 55),
Summary = Summaries[Random.Shared.Next(Summaries.Length)]
})
.ToArray();
}
}
}

View File

@@ -0,0 +1,14 @@
namespace house_plant_api.Models
{
using System;
public class Device
{
public int Id { get; set; }
public string Name { get; set; }
public string Nickname { get; set; }
public string Uuid { get; set; }
public int? Moisture { get; set; }
public DateTime? LastSeen { get; set; }
}
}

View File

@@ -1,25 +1,51 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.EntityFrameworkCore;
using house_plant_api.Context;
using house_plant_api.Services;
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
// 1. Register EF Core with DbContextFactory
builder.Services.AddDbContextFactory<AppDbContext>(options =>
options.UseSqlite("Data Source=devices.db"));
// 2. Register the BluetoothService (can be Singleton or Transient)
builder.Services.AddSingleton<BluetoothService>();
// 3. Register the hosted service
builder.Services.AddHostedService<DevicePollingService>();
// 4. Add controllers
builder.Services.AddControllers();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
// 1. Register CORS services
builder.Services.AddCors(options =>
{
options.AddPolicy("AllowAll", policyBuilder =>
{
policyBuilder
.AllowAnyOrigin() // Allows requests from any domain
.AllowAnyHeader() // Allows any request headers
.AllowAnyMethod(); // Allows any HTTP method (GET, POST, PUT, etc.)
});
});
var app = builder.Build();
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
// 3. Use CORS with the named policy
app.UseCors("AllowAll");
// Ensure DB is created or migrated
using (var scope = app.Services.CreateScope())
{
app.UseSwagger();
app.UseSwaggerUI();
var dbContextFactory = scope.ServiceProvider.GetRequiredService<IDbContextFactory<AppDbContext>>();
using var dbContext = dbContextFactory.CreateDbContext();
dbContext.Database.EnsureCreated(); // or dbContext.Database.Migrate() if using migrations
}
app.UseHttpsRedirection();
app.UseAuthorization();
app.MapControllers();
app.Run();
app.Run();

View File

@@ -0,0 +1,53 @@
namespace house_plant_api.Services
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using house_plant_api.Models;
using InTheHand.Bluetooth;
public class BluetoothService
{
private readonly Guid _serviceUuid = Guid.Parse("12345678-1234-1234-1234-123456789abc");
private readonly Guid _characteristicUuid = Guid.Parse("abcd1234-5678-1234-5678-abcdef123456");
public async Task<IReadOnlyCollection<BluetoothDevice>> ScanDevicesAsync()
{
// Scan for BLE devices
return await Bluetooth.ScanForDevicesAsync();
}
public async Task<int> GetSoilMoistureAsync(string deviceName)
{
// 1. Scan for devices and match by name
var devices = await Bluetooth.ScanForDevicesAsync();
var targetDevice = devices.FirstOrDefault(d => d.Name == deviceName);
if (targetDevice == null)
throw new Exception($"Device '{deviceName}' not found.");
// 2. Connect and read moisture
await targetDevice.Gatt.ConnectAsync();
try
{
var services = await targetDevice.Gatt.GetPrimaryServicesAsync();
var targetService = services.FirstOrDefault(s => s.Uuid == _serviceUuid);
if (targetService == null)
throw new Exception("Moisture service not found.");
var characteristics = await targetService.GetCharacteristicsAsync();
var targetCharacteristic = characteristics.FirstOrDefault(c => c.Uuid == _characteristicUuid);
if (targetCharacteristic == null)
throw new Exception("Moisture characteristic not found.");
var value = await targetCharacteristic.ReadValueAsync();
return BitConverter.ToInt32(value, 0);
}
finally
{
targetDevice.Gatt.Disconnect();
}
}
}
}

View File

@@ -0,0 +1,101 @@
namespace house_plant_api.Services
{
using house_plant_api.Context;
using house_plant_api.Models;
using Microsoft.EntityFrameworkCore;
using System;
using System.Linq;
using System.Threading.Tasks;
public class CachedBluetoothService
{
private readonly BluetoothService _bluetoothService;
private readonly IDbContextFactory<AppDbContext> _dbContextFactory;
public CachedBluetoothService(
BluetoothService bluetoothService,
IDbContextFactory<AppDbContext> dbContextFactory)
{
_bluetoothService = bluetoothService;
_dbContextFactory = dbContextFactory;
}
public List<Device> GetTrackedDevices()
{
// If you're using an IDbContextFactory:
using var dbContext = _dbContextFactory.CreateDbContext();
// Or if you're injecting a scoped dbContext (see note below):
// var dbContext = _dbContext;
return dbContext.Devices.ToList();
}
public async Task<List<Device>> GetTrackedDevicesAsync()
{
using var dbContext = _dbContextFactory.CreateDbContext();
return await dbContext.Devices.ToListAsync();
}
public async Task PollDevicesAsync()
{
try
{
var devices = await _bluetoothService.ScanDevicesAsync();
// Create a fresh AppDbContext instance
using var dbContext = _dbContextFactory.CreateDbContext();
foreach (var device in devices)
{
var existingDevice = dbContext.Devices
.FirstOrDefault(d => d.Uuid == device.Id.ToString());
if (existingDevice == null)
{
dbContext.Devices.Add(new Device
{
Name = device.Name,
Nickname = "Pakkun Flower",
Uuid = device.Id.ToString(),
LastSeen = DateTime.Now
});
}
else
{
existingDevice.LastSeen = DateTime.Now;
try
{
var moisture = await _bluetoothService.GetSoilMoistureAsync(device.Name);
existingDevice.Moisture = moisture;
}
catch
{
// Swallow exceptions from reading moisture
}
}
}
await dbContext.SaveChangesAsync();
}
catch (Exception ex)
{
Console.WriteLine($"Error during polling: {ex.Message}");
}
}
public async Task<bool> DeleteDeviceAsync(string name)
{
using var dbContext = _dbContextFactory.CreateDbContext();
var device = dbContext.Devices.FirstOrDefault(d => d.Name == name);
if (device == null)
return false;
dbContext.Devices.Remove(device);
await dbContext.SaveChangesAsync();
return true;
}
}
}

View File

@@ -0,0 +1,103 @@
namespace house_plant_api.Services
{
using System;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Microsoft.EntityFrameworkCore;
using InTheHand.Bluetooth;
using house_plant_api.Context;
using house_plant_api.Models;
public class DevicePollingService : BackgroundService
{
private readonly ILogger<DevicePollingService> _logger;
private readonly BluetoothService _bluetoothService;
private readonly IDbContextFactory<AppDbContext> _dbContextFactory;
private readonly TimeSpan _pollingInterval = TimeSpan.FromSeconds(30);
public DevicePollingService(
ILogger<DevicePollingService> logger,
BluetoothService bluetoothService,
IDbContextFactory<AppDbContext> dbContextFactory)
{
_logger = logger;
_bluetoothService = bluetoothService;
_dbContextFactory = dbContextFactory;
}
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
while (!stoppingToken.IsCancellationRequested)
{
await PollDevicesAsync();
await Task.Delay(_pollingInterval, stoppingToken);
}
}
private async Task PollDevicesAsync()
{
_logger.LogInformation("Polling devices for moisture data...");
try
{
// 1. Scan for BLE devices
var devices = await _bluetoothService.ScanDevicesAsync();
// 2. Open a new DB context for each polling run
using var dbContext = _dbContextFactory.CreateDbContext();
// 3. Filter devices that have "SoilSensor" in the name (if desired)
var soilDevices = devices
.Where(d => !string.IsNullOrEmpty(d.Name) && d.Name.Contains("SoilSensor", StringComparison.OrdinalIgnoreCase))
.ToList();
// 4. For each device, attempt to get moisture data and store/update in DB
foreach (var device in soilDevices)
{
var existingDevice = dbContext.Devices
.FirstOrDefault(d => d.Uuid == device.Id.ToString());
if (existingDevice == null)
{
// Add new device to DB
existingDevice = new Device
{
Name = device.Name,
Nickname = "Pakkun Flower",
Uuid = device.Id.ToString(),
LastSeen = DateTime.Now
};
dbContext.Devices.Add(existingDevice);
}
else
{
existingDevice.LastSeen = DateTime.Now;
}
try
{
// Attempt to read moisture from the device
var moisture = await _bluetoothService.GetSoilMoistureAsync(device.Name);
existingDevice.Moisture = moisture;
}
catch (Exception ex)
{
// If reading fails, log and continue
_logger.LogWarning(ex, $"Failed to read moisture from {device.Name}");
}
}
// 5. Save changes
await dbContext.SaveChangesAsync();
_logger.LogInformation("Polling cycle complete.");
}
catch (Exception ex)
{
_logger.LogError(ex, "Error during device polling.");
}
}
}
}

View File

@@ -1,13 +0,0 @@
namespace house_plant_api
{
public class WeatherForecast
{
public DateTime Date { get; set; }
public int TemperatureC { get; set; }
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
public string? Summary { get; set; }
}
}

BIN
house-plant-api/devices.db Normal file

Binary file not shown.

Binary file not shown.

View File

View File

@@ -1,14 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0-windows10.0.26100.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>house_plant_api</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
<PackageReference Include="InTheHand.BluetoothLE" Version="4.0.37" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.0" />
<PackageReference Include="RJCP.SerialPortStream" Version="3.0.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="7.2.0" />
<PackageReference Include="System.IO.Ports" Version="9.0.0" />
</ItemGroup>
<ItemGroup>
<Folder Include="Adapters\" />
</ItemGroup>
</Project>

View File

@@ -1,4 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v6.0", FrameworkDisplayName = "")]
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]

View File

@@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("house-plant-api")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+a426dce05e7078fd640479bc6275b245e1288429")]
[assembly: System.Reflection.AssemblyProductAttribute("house-plant-api")]
[assembly: System.Reflection.AssemblyTitleAttribute("house-plant-api")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

View File

@@ -1 +1 @@
d796f82a1c446807029172459080abd107ad0179
cb53261d04034aa4f1c238bde724ae959471c3d7407c687211410d9a41ef0a2a

View File

@@ -5,12 +5,17 @@ build_property.UsingMicrosoftNETSdkWeb = true
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = house_plant_api
build_property.RootNamespace = house_plant_api
build_property.ProjectDir = C:\Users\ckoch\Documents\GitHub\houseplant\house-plant-api\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.RazorLangVersion = 6.0
build_property.SupportLocalizedComponentNames =
build_property.GenerateRazorMetadataSourceChecksumAttributes =
build_property.MSBuildProjectDirectory = C:\Users\ckoch\Documents\GitHub\houseplant\house-plant-api
build_property._RazorSourceGeneratorDebug =
build_property.EffectiveAnalysisLevelStyle = 6.0
build_property.EnableCodeStyleSeverity =

View File

@@ -13,20 +13,25 @@
"packagesPath": "C:\\Users\\ckoch\\.nuget\\packages\\",
"outputPath": "C:\\Users\\ckoch\\Documents\\GitHub\\houseplant\\house-plant-api\\obj\\",
"projectStyle": "PackageReference",
"fallbackFolders": [
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
],
"configFilePaths": [
"C:\\Users\\ckoch\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
"net6.0"
"net8.0-windows10.0.26100.0"
],
"sources": {
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"C:\\Program Files\\dotnet\\library-packs": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net6.0": {
"targetAlias": "net6.0",
"net8.0-windows10.0.26100": {
"targetAlias": "net8.0-windows10.0.26100.0",
"projectReferences": {}
}
},
@@ -34,15 +39,41 @@
"warnAsError": [
"NU1605"
]
}
},
"restoreAuditProperties": {
"enableAudit": "true",
"auditLevel": "low",
"auditMode": "direct"
},
"SdkAnalysisLevel": "9.0.100"
},
"frameworks": {
"net6.0": {
"targetAlias": "net6.0",
"net8.0-windows10.0.26100": {
"targetAlias": "net8.0-windows10.0.26100.0",
"dependencies": {
"InTheHand.BluetoothLE": {
"target": "Package",
"version": "[4.0.37, )"
},
"Microsoft.EntityFrameworkCore": {
"target": "Package",
"version": "[9.0.0, )"
},
"Microsoft.EntityFrameworkCore.Sqlite": {
"target": "Package",
"version": "[9.0.0, )"
},
"RJCP.SerialPortStream": {
"target": "Package",
"version": "[3.0.1, )"
},
"Swashbuckle.AspNetCore": {
"target": "Package",
"version": "[6.2.3, )"
"version": "[7.2.0, )"
},
"System.IO.Ports": {
"target": "Package",
"version": "[9.0.0, )"
}
},
"imports": [
@@ -51,19 +82,29 @@
"net47",
"net471",
"net472",
"net48"
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"downloadDependencies": [
{
"name": "Microsoft.Windows.SDK.NET.Ref",
"version": "[10.0.26100.54, 10.0.26100.54]"
}
],
"frameworkReferences": {
"Microsoft.AspNetCore.App": {
"privateAssets": "none"
},
"Microsoft.NETCore.App": {
"privateAssets": "all"
},
"Microsoft.Windows.SDK.NET.Ref.Windows": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\6.0.300\\RuntimeIdentifierGraph.json"
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.101/PortableRuntimeIdentifierGraph.json"
}
}
}

View File

@@ -5,18 +5,20 @@
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\ckoch\.nuget\packages\</NuGetPackageFolders>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\ckoch\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.2.0</NuGetToolVersion>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.12.2</NuGetToolVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="C:\Users\ckoch\.nuget\packages\" />
<SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" />
</ItemGroup>
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<Import Project="$(NuGetPackageRoot)microsoft.extensions.apidescription.server\3.0.0\build\Microsoft.Extensions.ApiDescription.Server.props" Condition="Exists('$(NuGetPackageRoot)microsoft.extensions.apidescription.server\3.0.0\build\Microsoft.Extensions.ApiDescription.Server.props')" />
<Import Project="$(NuGetPackageRoot)swashbuckle.aspnetcore\6.2.3\build\Swashbuckle.AspNetCore.props" Condition="Exists('$(NuGetPackageRoot)swashbuckle.aspnetcore\6.2.3\build\Swashbuckle.AspNetCore.props')" />
<Import Project="$(NuGetPackageRoot)microsoft.extensions.apidescription.server\6.0.5\build\Microsoft.Extensions.ApiDescription.Server.props" Condition="Exists('$(NuGetPackageRoot)microsoft.extensions.apidescription.server\6.0.5\build\Microsoft.Extensions.ApiDescription.Server.props')" />
<Import Project="$(NuGetPackageRoot)swashbuckle.aspnetcore\7.2.0\build\Swashbuckle.AspNetCore.props" Condition="Exists('$(NuGetPackageRoot)swashbuckle.aspnetcore\7.2.0\build\Swashbuckle.AspNetCore.props')" />
<Import Project="$(NuGetPackageRoot)microsoft.entityframeworkcore\9.0.0\buildTransitive\net8.0\Microsoft.EntityFrameworkCore.props" Condition="Exists('$(NuGetPackageRoot)microsoft.entityframeworkcore\9.0.0\buildTransitive\net8.0\Microsoft.EntityFrameworkCore.props')" />
</ImportGroup>
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<PkgMicrosoft_Extensions_ApiDescription_Server Condition=" '$(PkgMicrosoft_Extensions_ApiDescription_Server)' == '' ">C:\Users\ckoch\.nuget\packages\microsoft.extensions.apidescription.server\3.0.0</PkgMicrosoft_Extensions_ApiDescription_Server>
<PkgMicrosoft_Extensions_ApiDescription_Server Condition=" '$(PkgMicrosoft_Extensions_ApiDescription_Server)' == '' ">C:\Users\ckoch\.nuget\packages\microsoft.extensions.apidescription.server\6.0.5</PkgMicrosoft_Extensions_ApiDescription_Server>
</PropertyGroup>
</Project>

View File

@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<Import Project="$(NuGetPackageRoot)microsoft.extensions.apidescription.server\3.0.0\build\Microsoft.Extensions.ApiDescription.Server.targets" Condition="Exists('$(NuGetPackageRoot)microsoft.extensions.apidescription.server\3.0.0\build\Microsoft.Extensions.ApiDescription.Server.targets')" />
<Import Project="$(NuGetPackageRoot)system.text.json\9.0.0\buildTransitive\net8.0\System.Text.Json.targets" Condition="Exists('$(NuGetPackageRoot)system.text.json\9.0.0\buildTransitive\net8.0\System.Text.Json.targets')" />
<Import Project="$(NuGetPackageRoot)microsoft.extensions.apidescription.server\6.0.5\build\Microsoft.Extensions.ApiDescription.Server.targets" Condition="Exists('$(NuGetPackageRoot)microsoft.extensions.apidescription.server\6.0.5\build\Microsoft.Extensions.ApiDescription.Server.targets')" />
<Import Project="$(NuGetPackageRoot)sqlitepclraw.lib.e_sqlite3\2.1.10\buildTransitive\net8.0\SQLitePCLRaw.lib.e_sqlite3.targets" Condition="Exists('$(NuGetPackageRoot)sqlitepclraw.lib.e_sqlite3\2.1.10\buildTransitive\net8.0\SQLitePCLRaw.lib.e_sqlite3.targets')" />
<Import Project="$(NuGetPackageRoot)microsoft.extensions.logging.abstractions\9.0.0\buildTransitive\net8.0\Microsoft.Extensions.Logging.Abstractions.targets" Condition="Exists('$(NuGetPackageRoot)microsoft.extensions.logging.abstractions\9.0.0\buildTransitive\net8.0\Microsoft.Extensions.Logging.Abstractions.targets')" />
<Import Project="$(NuGetPackageRoot)microsoft.extensions.options\9.0.0\buildTransitive\net8.0\Microsoft.Extensions.Options.targets" Condition="Exists('$(NuGetPackageRoot)microsoft.extensions.options\9.0.0\buildTransitive\net8.0\Microsoft.Extensions.Options.targets')" />
</ImportGroup>
</Project>

File diff suppressed because it is too large Load Diff

View File

@@ -1,15 +1,67 @@
{
"version": 2,
"dgSpecHash": "TZR7dwYDmoyD67xypwPseSB2Di+h3O/d0yPswVHv3S4J6/mesVamsaw3JtGg6B8krMEp/rUL3YVRzMic8p5e3Q==",
"dgSpecHash": "puDPynTpJjc=",
"success": true,
"projectFilePath": "C:\\Users\\ckoch\\Documents\\GitHub\\houseplant\\house-plant-api\\house-plant-api.csproj",
"expectedPackageFiles": [
"C:\\Users\\ckoch\\.nuget\\packages\\microsoft.extensions.apidescription.server\\3.0.0\\microsoft.extensions.apidescription.server.3.0.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\microsoft.openapi\\1.2.3\\microsoft.openapi.1.2.3.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\swashbuckle.aspnetcore\\6.2.3\\swashbuckle.aspnetcore.6.2.3.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\swashbuckle.aspnetcore.swagger\\6.2.3\\swashbuckle.aspnetcore.swagger.6.2.3.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\swashbuckle.aspnetcore.swaggergen\\6.2.3\\swashbuckle.aspnetcore.swaggergen.6.2.3.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\swashbuckle.aspnetcore.swaggerui\\6.2.3\\swashbuckle.aspnetcore.swaggerui.6.2.3.nupkg.sha512"
"C:\\Users\\ckoch\\.nuget\\packages\\inthehand.bluetoothle\\4.0.37\\inthehand.bluetoothle.4.0.37.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\microsoft.data.sqlite.core\\9.0.0\\microsoft.data.sqlite.core.9.0.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\microsoft.entityframeworkcore\\9.0.0\\microsoft.entityframeworkcore.9.0.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\microsoft.entityframeworkcore.abstractions\\9.0.0\\microsoft.entityframeworkcore.abstractions.9.0.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\microsoft.entityframeworkcore.analyzers\\9.0.0\\microsoft.entityframeworkcore.analyzers.9.0.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\microsoft.entityframeworkcore.relational\\9.0.0\\microsoft.entityframeworkcore.relational.9.0.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\microsoft.entityframeworkcore.sqlite\\9.0.0\\microsoft.entityframeworkcore.sqlite.9.0.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\microsoft.entityframeworkcore.sqlite.core\\9.0.0\\microsoft.entityframeworkcore.sqlite.core.9.0.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\microsoft.extensions.apidescription.server\\6.0.5\\microsoft.extensions.apidescription.server.6.0.5.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\microsoft.extensions.caching.abstractions\\9.0.0\\microsoft.extensions.caching.abstractions.9.0.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\microsoft.extensions.caching.memory\\9.0.0\\microsoft.extensions.caching.memory.9.0.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\microsoft.extensions.configuration.abstractions\\9.0.0\\microsoft.extensions.configuration.abstractions.9.0.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\microsoft.extensions.dependencyinjection\\9.0.0\\microsoft.extensions.dependencyinjection.9.0.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\microsoft.extensions.dependencyinjection.abstractions\\9.0.0\\microsoft.extensions.dependencyinjection.abstractions.9.0.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\microsoft.extensions.dependencymodel\\9.0.0\\microsoft.extensions.dependencymodel.9.0.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\microsoft.extensions.logging\\9.0.0\\microsoft.extensions.logging.9.0.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\microsoft.extensions.logging.abstractions\\9.0.0\\microsoft.extensions.logging.abstractions.9.0.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\microsoft.extensions.options\\9.0.0\\microsoft.extensions.options.9.0.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\microsoft.extensions.primitives\\9.0.0\\microsoft.extensions.primitives.9.0.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\microsoft.openapi\\1.6.22\\microsoft.openapi.1.6.22.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\rjcp.core.environment\\0.3.0\\rjcp.core.environment.0.3.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\rjcp.core.syscompat\\0.2.0\\rjcp.core.syscompat.0.2.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\rjcp.diagnostics.trace\\0.2.1\\rjcp.diagnostics.trace.0.2.1.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\rjcp.io.buffer\\0.2.1\\rjcp.io.buffer.0.2.1.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\rjcp.io.device\\0.8.1\\rjcp.io.device.0.8.1.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\rjcp.serialportstream\\3.0.1\\rjcp.serialportstream.3.0.1.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\runtime.android-arm.runtime.native.system.io.ports\\9.0.0\\runtime.android-arm.runtime.native.system.io.ports.9.0.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\runtime.android-arm64.runtime.native.system.io.ports\\9.0.0\\runtime.android-arm64.runtime.native.system.io.ports.9.0.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\runtime.android-x64.runtime.native.system.io.ports\\9.0.0\\runtime.android-x64.runtime.native.system.io.ports.9.0.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\runtime.android-x86.runtime.native.system.io.ports\\9.0.0\\runtime.android-x86.runtime.native.system.io.ports.9.0.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\runtime.linux-arm.runtime.native.system.io.ports\\9.0.0\\runtime.linux-arm.runtime.native.system.io.ports.9.0.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\runtime.linux-arm64.runtime.native.system.io.ports\\9.0.0\\runtime.linux-arm64.runtime.native.system.io.ports.9.0.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\runtime.linux-bionic-arm64.runtime.native.system.io.ports\\9.0.0\\runtime.linux-bionic-arm64.runtime.native.system.io.ports.9.0.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\runtime.linux-bionic-x64.runtime.native.system.io.ports\\9.0.0\\runtime.linux-bionic-x64.runtime.native.system.io.ports.9.0.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\runtime.linux-musl-arm.runtime.native.system.io.ports\\9.0.0\\runtime.linux-musl-arm.runtime.native.system.io.ports.9.0.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\runtime.linux-musl-arm64.runtime.native.system.io.ports\\9.0.0\\runtime.linux-musl-arm64.runtime.native.system.io.ports.9.0.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\runtime.linux-musl-x64.runtime.native.system.io.ports\\9.0.0\\runtime.linux-musl-x64.runtime.native.system.io.ports.9.0.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\runtime.linux-x64.runtime.native.system.io.ports\\9.0.0\\runtime.linux-x64.runtime.native.system.io.ports.9.0.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\runtime.maccatalyst-arm64.runtime.native.system.io.ports\\9.0.0\\runtime.maccatalyst-arm64.runtime.native.system.io.ports.9.0.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\runtime.maccatalyst-x64.runtime.native.system.io.ports\\9.0.0\\runtime.maccatalyst-x64.runtime.native.system.io.ports.9.0.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\runtime.native.system.io.ports\\9.0.0\\runtime.native.system.io.ports.9.0.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\runtime.osx-arm64.runtime.native.system.io.ports\\9.0.0\\runtime.osx-arm64.runtime.native.system.io.ports.9.0.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\runtime.osx-x64.runtime.native.system.io.ports\\9.0.0\\runtime.osx-x64.runtime.native.system.io.ports.9.0.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\sqlitepclraw.bundle_e_sqlite3\\2.1.10\\sqlitepclraw.bundle_e_sqlite3.2.1.10.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\sqlitepclraw.core\\2.1.10\\sqlitepclraw.core.2.1.10.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\sqlitepclraw.lib.e_sqlite3\\2.1.10\\sqlitepclraw.lib.e_sqlite3.2.1.10.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\sqlitepclraw.provider.e_sqlite3\\2.1.10\\sqlitepclraw.provider.e_sqlite3.2.1.10.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\swashbuckle.aspnetcore\\7.2.0\\swashbuckle.aspnetcore.7.2.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\swashbuckle.aspnetcore.swagger\\7.2.0\\swashbuckle.aspnetcore.swagger.7.2.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\swashbuckle.aspnetcore.swaggergen\\7.2.0\\swashbuckle.aspnetcore.swaggergen.7.2.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\swashbuckle.aspnetcore.swaggerui\\7.2.0\\swashbuckle.aspnetcore.swaggerui.7.2.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\system.diagnostics.diagnosticsource\\9.0.0\\system.diagnostics.diagnosticsource.9.0.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\system.io.pipelines\\9.0.0\\system.io.pipelines.9.0.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\system.io.ports\\9.0.0\\system.io.ports.9.0.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\system.memory\\4.5.3\\system.memory.4.5.3.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\system.text.encodings.web\\9.0.0\\system.text.encodings.web.9.0.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\system.text.json\\9.0.0\\system.text.json.9.0.0.nupkg.sha512",
"C:\\Users\\ckoch\\.nuget\\packages\\microsoft.windows.sdk.net.ref\\10.0.26100.54\\microsoft.windows.sdk.net.ref.10.0.26100.54.nupkg.sha512"
],
"logs": []
}