точно-точно готово
This commit is contained in:
parent
1ad47faea0
commit
a003aff777
@ -1,14 +1,5 @@
|
||||
using FishFactoryDataModel.Models;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using FishFactoryContracts.BusinessLogicsContracts;
|
||||
using FishFactoryContracts.SearchModels;
|
||||
using FishFactoryContracts.BindingModels;
|
||||
|
@ -9,7 +9,7 @@ namespace FishFactoryDatabaseImplement
|
||||
{
|
||||
if (optionsBuilder.IsConfigured == false)
|
||||
{
|
||||
optionsBuilder.UseNpgsql(@"Host=localhost;Database=FishFactory;Username=postgres;Password=postgres");
|
||||
optionsBuilder.UseNpgsql(@"Host=localhost;Database=FishFactory2;Username=postgres;Password=postgres");
|
||||
}
|
||||
base.OnConfiguring(optionsBuilder);
|
||||
AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true);
|
||||
|
@ -12,7 +12,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
namespace FishFactoryDatabaseImplement.Migrations
|
||||
{
|
||||
[DbContext(typeof(FishFactoryDatabase))]
|
||||
[Migration("20240319164852_InitialCreate")]
|
||||
[Migration("20240320065127_InitialCreate")]
|
||||
partial class InitialCreate
|
||||
{
|
||||
/// <inheritdoc />
|
@ -6,7 +6,7 @@ using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace FishFactoryDatabaseImplement.Models
|
||||
{
|
||||
public class Canned
|
||||
public class Canned : ICannedModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
[Required]
|
||||
|
@ -3,10 +3,11 @@ using System.ComponentModel.DataAnnotations;
|
||||
using FishFactoryDataModel.Enums;
|
||||
using FishFactoryContracts.BindingModels;
|
||||
using FishFactoryContracts.ViewModels;
|
||||
using FishFactoryDataModel.Models;
|
||||
|
||||
namespace FishFactoryDatabaseImplement.Models
|
||||
{
|
||||
public class Order
|
||||
public class Order : IOrderModel
|
||||
{
|
||||
public int Id { get; private set; }
|
||||
[Required]
|
||||
@ -27,6 +28,7 @@ namespace FishFactoryDatabaseImplement.Models
|
||||
{
|
||||
Id = model.Id,
|
||||
CannedId = model.CannedId,
|
||||
Canned = context.Canneds.First(x => x.Id == model.CannedId),
|
||||
Count = model.Count,
|
||||
Sum = model.Sum,
|
||||
Status = model.Status,
|
||||
|
Loading…
Reference in New Issue
Block a user