Skip to content

Commit

Permalink
Backup Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
neojarvis committed Sep 21, 2023
1 parent 19e7615 commit 66cb489
Show file tree
Hide file tree
Showing 63 changed files with 1,154 additions and 4 deletions.
12 changes: 12 additions & 0 deletions dotnetproject/dotnetmsAddCustomer/.config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-ef": {
"version": "6.0.0",
"commands": [
"dotnet-ef"
]
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Microsoft.AspNetCore.Mvc;
using dotnetwebapiAddCustomer.Models;
using dotnetmsAddCustomer.Models;

namespace dotnetwebapiAddCustomer.Controllers;
namespace dotnetmsAddCustomer.Controllers;

[ApiController]
[Route("[controller]")]
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace dotnetmsAddCustomer.Migrations
{
public partial class SetupTables : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.EnsureSchema(
name: "dbo");

migrationBuilder.CreateTable(
name: "customer",
schema: "dbo",
columns: table => new
{
customer_id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
customer_name = table.Column<string>(type: "nvarchar(max)", nullable: false),
customer_mobilenumber = table.Column<string>(type: "nvarchar(max)", nullable: false),
customer_email = table.Column<string>(type: "nvarchar(max)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_customer", x => x.customer_id);
});
}

protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "customer",
schema: "dbo");
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// <auto-generated />
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using dotnetmsAddCustomer.Models;

#nullable disable

namespace dotnetmsAddCustomer.Migrations
{
[DbContext(typeof(CustomerDbContext))]
partial class CustomerDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "6.0.0")
.HasAnnotation("Relational:MaxIdentifierLength", 128);

SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);

modelBuilder.Entity("dotnetmsAddCustomer.Models.Customer", b =>
{
b.Property<int>("CustomerId")
.ValueGeneratedOnAdd()
.HasColumnType("int")
.HasColumnName("customer_id");

SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("CustomerId"), 1L, 1);

b.Property<string>("CustomerName")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnName("customer_name");

b.Property<string>("Email")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnName("customer_email");

b.Property<string>("MobileNumber")
.IsRequired()
.HasColumnType("nvarchar(max)")
.HasColumnName("customer_mobilenumber");

b.HasKey("CustomerId");

b.ToTable("customer", "dbo");
});
#pragma warning restore 612, 618
}
}
}
2 changes: 1 addition & 1 deletion dotnetproject/dotnetmsAddCustomer/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
},
"AllowedHosts": "*",
"ConnectionStrings": {
"MyConnString":"User ID=sa;password=examlyMssql@123;server=dffafdafebcfacbdcbaeadbebabcdebdca-0;Database=CheckDB;trusted_connection=false;Persist Security Info=False;Encrypt=False;"
"MyConnString":"User ID=sa;password=examlyMssql@123;server=localhost;Database=CheckDB;trusted_connection=false;Persist Security Info=False;Encrypt=False;"
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*",
"ConnectionStrings": {
"MyConnString":"User ID=sa;password=examlyMssql@123;server=localhost;Database=CheckDB;trusted_connection=false;Persist Security Info=False;Encrypt=False;"
}
}
Binary file not shown.
Loading

0 comments on commit 66cb489

Please sign in to comment.