GreenSimpleCaptcha 1.0.2
dotnet add package GreenSimpleCaptcha --version 1.0.2
NuGet\Install-Package GreenSimpleCaptcha -Version 1.0.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="GreenSimpleCaptcha" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="GreenSimpleCaptcha" Version="1.0.2" />
<PackageReference Include="GreenSimpleCaptcha" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add GreenSimpleCaptcha --version 1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: GreenSimpleCaptcha, 1.0.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package GreenSimpleCaptcha@1.0.2
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=GreenSimpleCaptcha&version=1.0.2
#tool nuget:?package=GreenSimpleCaptcha&version=1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Command
dotnet ef dbcontext scaffold "Server=localhost\SQLEXPRESS;Database=DemoLocal;Trusted_Connection=True;Integrated Security=True;Encrypt=False" Microsoft.EntityFrameworkCore.SqlServer --project .\ToysShop.csproj
Code
DemoLocalContext.cs
using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore;
namespace ToysShop;
public partial class DemoLocalContext : DbContext
{
public DemoLocalContext()
{
}
public DemoLocalContext(DbContextOptions<DemoLocalContext> options)
: base(options)
{
}
public virtual DbSet<Address> Addresses { get; set; }
public virtual DbSet<Category> Categories { get; set; }
public virtual DbSet<Order> Orders { get; set; }
public virtual DbSet<OrderProduct> OrderProducts { get; set; }
public virtual DbSet<OrderStatus> OrderStatuses { get; set; }
public virtual DbSet<Producer> Producers { get; set; }
public virtual DbSet<Product> Products { get; set; }
public virtual DbSet<Supplier> Suppliers { get; set; }
public virtual DbSet<UnitsOfMeasurement> UnitsOfMeasurements { get; set; }
public virtual DbSet<User> Users { get; set; }
public virtual DbSet<UserRole> UserRoles { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
#warning To protect potentially sensitive information in your connection string, you should move it out of source code. You can avoid scaffolding the connection string by using the Name= syntax to read it from configuration - see https://go.microsoft.com/fwlink/?linkid=2131148. For more guidance on storing connection strings, see https://go.microsoft.com/fwlink/?LinkId=723263.
=> optionsBuilder.UseSqlServer("Server=localhost\\SQLEXPRESS;Database=DemoLocal;Trusted_Connection=True;Integrated Security=True;Encrypt=False");
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<Address>(entity =>
{
entity.Property(e => e.Id).ValueGeneratedNever();
entity.Property(e => e.Address1)
.HasMaxLength(255)
.HasColumnName("Address");
});
modelBuilder.Entity<Category>(entity =>
{
entity.Property(e => e.Id).ValueGeneratedNever();
entity.Property(e => e.Category1)
.HasMaxLength(255)
.HasColumnName("Category");
});
modelBuilder.Entity<Order>(entity =>
{
entity.Property(e => e.Id).ValueGeneratedNever();
entity.Property(e => e.Code).HasMaxLength(255);
entity.Property(e => e.DeliveryDate).HasColumnType("datetime");
entity.Property(e => e.OrderDate).HasColumnType("datetime");
entity.HasOne(d => d.Address).WithMany(p => p.Orders)
.HasForeignKey(d => d.AddressId)
.HasConstraintName("FK_Orders_Addresses");
entity.HasOne(d => d.Client).WithMany(p => p.Orders)
.HasForeignKey(d => d.ClientId)
.HasConstraintName("FK_Orders_Users");
entity.HasOne(d => d.Status).WithMany(p => p.Orders)
.HasForeignKey(d => d.StatusId)
.HasConstraintName("FK_Orders_OrderStatuses");
});
modelBuilder.Entity<OrderProduct>(entity =>
{
entity.HasKey(e => new { e.OrderId, e.ProductId });
entity.HasOne(d => d.Order).WithMany(p => p.OrderProducts)
.HasForeignKey(d => d.OrderId)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("FK_OrderProducts_Orders");
entity.HasOne(d => d.Product).WithMany(p => p.OrderProducts)
.HasForeignKey(d => d.ProductId)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("FK_OrderProducts_Products");
});
modelBuilder.Entity<OrderStatus>(entity =>
{
entity.Property(e => e.Id).ValueGeneratedNever();
entity.Property(e => e.Status).HasMaxLength(255);
});
modelBuilder.Entity<Producer>(entity =>
{
entity.Property(e => e.Id).ValueGeneratedNever();
entity.Property(e => e.Producer1)
.HasMaxLength(255)
.HasColumnName("Producer");
});
modelBuilder.Entity<Product>(entity =>
{
entity.Property(e => e.Id).ValueGeneratedNever();
entity.Property(e => e.Article).HasMaxLength(255);
entity.Property(e => e.Image).HasMaxLength(255);
entity.Property(e => e.Name).HasMaxLength(255);
entity.HasOne(d => d.Category).WithMany(p => p.Products)
.HasForeignKey(d => d.CategoryId)
.HasConstraintName("FK_Products_Categories");
entity.HasOne(d => d.Producer).WithMany(p => p.Products)
.HasForeignKey(d => d.ProducerId)
.HasConstraintName("FK_Products_Producers");
entity.HasOne(d => d.Supplier).WithMany(p => p.Products)
.HasForeignKey(d => d.SupplierId)
.HasConstraintName("FK_Products_Suppliers");
entity.HasOne(d => d.UnitOfMeasurement).WithMany(p => p.Products)
.HasForeignKey(d => d.UnitOfMeasurementId)
.HasConstraintName("FK_Products_UnitsOfMeasurement");
});
modelBuilder.Entity<Supplier>(entity =>
{
entity.Property(e => e.Id).ValueGeneratedNever();
entity.Property(e => e.Supplier1)
.HasMaxLength(255)
.HasColumnName("Supplier");
});
modelBuilder.Entity<UnitsOfMeasurement>(entity =>
{
entity.ToTable("UnitsOfMeasurement");
entity.Property(e => e.Id).ValueGeneratedNever();
entity.Property(e => e.UnitOfMeasurement).HasMaxLength(255);
});
modelBuilder.Entity<User>(entity =>
{
entity.Property(e => e.Id).ValueGeneratedNever();
entity.Property(e => e.FullName).HasMaxLength(255);
entity.Property(e => e.Login).HasMaxLength(255);
entity.Property(e => e.Password).HasMaxLength(255);
entity.HasOne(d => d.Role).WithMany(p => p.Users)
.HasForeignKey(d => d.RoleId)
.HasConstraintName("FK_Users_UserRoles");
});
modelBuilder.Entity<UserRole>(entity =>
{
entity.Property(e => e.Id).ValueGeneratedNever();
entity.Property(e => e.Role).HasMaxLength(255);
});
OnModelCreatingPartial(modelBuilder);
}
partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
}
Address.cs
using System;
using System.Collections.Generic;
namespace ToysShop;
public partial class Address
{
public int Id { get; set; }
public string? Address1 { get; set; }
public virtual ICollection<Order> Orders { get; set; } = new List<Order>();
}
Order.cs
using System;
using System.Collections.Generic;
namespace ToysShop;
public partial class Order
{
public int Id { get; set; }
public DateTime? OrderDate { get; set; }
public DateTime? DeliveryDate { get; set; }
public int? AddressId { get; set; }
public int? ClientId { get; set; }
public string? Code { get; set; }
public int? StatusId { get; set; }
public virtual Address? Address { get; set; }
public virtual User? Client { get; set; }
public virtual ICollection<OrderProduct> OrderProducts { get; set; } = new List<OrderProduct>();
public virtual OrderStatus? Status { get; set; }
}
Product.cs
using System;
using System.Collections.Generic;
namespace ToysShop;
public partial class Product
{
public int Id { get; set; }
public string? Article { get; set; }
public string? Name { get; set; }
public int? UnitOfMeasurementId { get; set; }
public int? Price { get; set; }
public int? SupplierId { get; set; }
public int? ProducerId { get; set; }
public int? CategoryId { get; set; }
public double? Sale { get; set; }
public int? Count { get; set; }
public string? Desc { get; set; }
public string? Image { get; set; }
public virtual Category? Category { get; set; }
public virtual ICollection<OrderProduct> OrderProducts { get; set; } = new List<OrderProduct>();
public virtual Producer? Producer { get; set; }
public virtual Supplier? Supplier { get; set; }
public virtual UnitsOfMeasurement? UnitOfMeasurement { get; set; }
}
OrderStatus.cs
using System;
using System.Collections.Generic;
namespace ToysShop;
public partial class OrderStatus
{
public int Id { get; set; }
public string? Status { get; set; }
public virtual ICollection<Order> Orders { get; set; } = new List<Order>();
}
OrderProduct.cs
using System;
using System.Collections.Generic;
namespace ToysShop;
public partial class OrderProduct
{
public int OrderId { get; set; }
public int ProductId { get; set; }
public int? Count { get; set; }
public virtual Order Order { get; set; } = null!;
public virtual Product Product { get; set; } = null!;
}
User.cs
using System;
using System.Collections.Generic;
namespace ToysShop;
public partial class User
{
public int Id { get; set; }
public int? RoleId { get; set; }
public string? FullName { get; set; }
public string? Login { get; set; }
public string? Password { get; set; }
public virtual ICollection<Order> Orders { get; set; } = new List<Order>();
public virtual UserRole? Role { get; set; }
}
UserRole.cs
using System;
using System.Collections.Generic;
namespace ToysShop;
public partial class User
{
public int Id { get; set; }
public int? RoleId { get; set; }
public string? FullName { get; set; }
public string? Login { get; set; }
public string? Password { get; set; }
public virtual ICollection<Order> Orders { get; set; } = new List<Order>();
public virtual UserRole? Role { get; set; }
}
Supplier.cs
using System;
using System.Collections.Generic;
namespace ToysShop;
public partial class Supplier
{
public int Id { get; set; }
public string? Supplier1 { get; set; }
public virtual ICollection<Product> Products { get; set; } = new List<Product>();
}
Producer.cs
using System;
using System.Collections.Generic;
namespace ToysShop;
public partial class Producer
{
public int Id { get; set; }
public string? Producer1 { get; set; }
public virtual ICollection<Product> Products { get; set; } = new List<Product>();
}
UnitsOfMeasurement.cs
using System;
using System.Collections.Generic;
namespace ToysShop;
public partial class UnitsOfMeasurement
{
public int Id { get; set; }
public string? UnitOfMeasurement { get; set; }
public virtual ICollection<Product> Products { get; set; } = new List<Product>();
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0-windows7.0 is compatible. net9.0-windows was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0-windows7.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.