-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from xforman2/28-more-effective-data-fetching
28 more effective data fetching
- Loading branch information
Showing
6 changed files
with
216 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
SharedDependencies/Migrations/20240901114150_InitialCreate.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
46 changes: 46 additions & 0 deletions
46
SharedDependencies/Migrations/20240901114150_InitialCreate.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
using Microsoft.EntityFrameworkCore.Migrations; | ||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; | ||
|
||
#nullable disable | ||
|
||
namespace SharedDependencies.Migrations | ||
{ | ||
/// <inheritdoc /> | ||
public partial class InitialCreate : Migration | ||
{ | ||
/// <inheritdoc /> | ||
protected override void Up(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.CreateTable( | ||
name: "Estates", | ||
columns: table => new | ||
{ | ||
Id = table | ||
.Column<int>(type: "integer", nullable: false) | ||
.Annotation( | ||
"Npgsql:ValueGenerationStrategy", | ||
NpgsqlValueGenerationStrategy.IdentityByDefaultColumn | ||
), | ||
ApiType = table.Column<int>(type: "integer", nullable: false), | ||
ApiId = table.Column<string>(type: "text", nullable: false), | ||
Address = table.Column<string>(type: "text", nullable: false), | ||
Price = table.Column<decimal>(type: "numeric", nullable: false), | ||
Link = table.Column<string>(type: "text", nullable: false), | ||
Surface = table.Column<double>(type: "double precision", nullable: false), | ||
EstateType = table.Column<int>(type: "integer", nullable: false), | ||
OfferType = table.Column<int>(type: "integer", nullable: false), | ||
}, | ||
constraints: table => | ||
{ | ||
table.PrimaryKey("PK_Estates", x => x.Id); | ||
} | ||
); | ||
} | ||
|
||
/// <inheritdoc /> | ||
protected override void Down(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.DropTable(name: "Estates"); | ||
} | ||
} | ||
} |
66 changes: 66 additions & 0 deletions
66
SharedDependencies/Migrations/HouseScoutContextModelSnapshot.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
// <auto-generated /> | ||
using Microsoft.EntityFrameworkCore; | ||
using Microsoft.EntityFrameworkCore.Infrastructure; | ||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; | ||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; | ||
using SharedDependencies.Model; | ||
|
||
#nullable disable | ||
|
||
namespace SharedDependencies.Migrations | ||
{ | ||
[DbContext(typeof(HouseScoutContext))] | ||
partial class HouseScoutContextModelSnapshot : ModelSnapshot | ||
{ | ||
protected override void BuildModel(ModelBuilder modelBuilder) | ||
{ | ||
#pragma warning disable 612, 618 | ||
modelBuilder | ||
.HasAnnotation("ProductVersion", "8.0.8") | ||
.HasAnnotation("Relational:MaxIdentifierLength", 63); | ||
|
||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); | ||
|
||
modelBuilder.Entity("HouseScout.Model.Estate", b => | ||
{ | ||
b.Property<int>("Id") | ||
.ValueGeneratedOnAdd() | ||
.HasColumnType("integer"); | ||
|
||
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id")); | ||
|
||
b.Property<string>("Address") | ||
.IsRequired() | ||
.HasColumnType("text"); | ||
|
||
b.Property<string>("ApiId") | ||
.IsRequired() | ||
.HasColumnType("text"); | ||
|
||
b.Property<int>("ApiType") | ||
.HasColumnType("integer"); | ||
|
||
b.Property<int>("EstateType") | ||
.HasColumnType("integer"); | ||
|
||
b.Property<string>("Link") | ||
.IsRequired() | ||
.HasColumnType("text"); | ||
|
||
b.Property<int>("OfferType") | ||
.HasColumnType("integer"); | ||
|
||
b.Property<decimal>("Price") | ||
.HasColumnType("numeric"); | ||
|
||
b.Property<double>("Surface") | ||
.HasColumnType("double precision"); | ||
|
||
b.HasKey("Id"); | ||
|
||
b.ToTable("Estates"); | ||
}); | ||
#pragma warning restore 612, 618 | ||
} | ||
} | ||
} |