diff --git a/SushiBar/Program.cs b/SushiBar/Program.cs index 868f2f1..36af50d 100644 --- a/SushiBar/Program.cs +++ b/SushiBar/Program.cs @@ -28,7 +28,6 @@ namespace SushiBar ConfigureServices(services); _serviceProvider = services.BuildServiceProvider(); Application.Run(_serviceProvider.GetRequiredService()); - //Application.Run(new Form1()); } private static void ConfigureServices(ServiceCollection services) diff --git a/SushiBarDatabaseImplement/Implements/SushiStorage.cs b/SushiBarDatabaseImplement/Implements/SushiStorage.cs index 5c13276..e7d9130 100644 --- a/SushiBarDatabaseImplement/Implements/SushiStorage.cs +++ b/SushiBarDatabaseImplement/Implements/SushiStorage.cs @@ -45,11 +45,9 @@ namespace SushiBarDatabaseImplement.Implements return context.Sushis .Include(x => x.Components) .ThenInclude(x => x.Component) - .FirstOrDefault(x => (!string.IsNullOrEmpty(model.SushiName) && - x.SushiName == model.SushiName) || - (model.Id.HasValue && x.Id == - model.Id)) - ?.GetViewModel; + .FirstOrDefault(x => + (!string.IsNullOrEmpty(model.SushiName) && x.SushiName == + model.SushiName) || (model.Id.HasValue && x.Id == model.Id))?.GetViewModel; } public SushiViewModel? Insert(SushiBindingModel model) { @@ -69,8 +67,7 @@ namespace SushiBarDatabaseImplement.Implements using var transaction = context.Database.BeginTransaction(); try { - var Sushi = context.Sushis.FirstOrDefault(rec => - rec.Id == model.Id); + var Sushi = context.Sushis.FirstOrDefault(rec => rec.Id == model.Id); if (Sushi == null) { return null;