Set size for company description.

This commit is contained in:
2019-05-18 17:49:44 +01:00
parent f5db8bbbff
commit 16c7dc0c38
5 changed files with 3339 additions and 713 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,19 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace Cicm.Database.Migrations
{
public partial class AnnotateCompanyDescription : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>("Text", "CompanyDescriptions", maxLength: 262144, nullable: true,
oldClrType: typeof(string), oldNullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>("Text", "CompanyDescriptions", nullable: true,
oldClrType: typeof(string), oldMaxLength: 262144, oldNullable: true);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -28,12 +28,15 @@
// Copyright © 2003-2018 Natalia Portillo // Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/ *******************************************************************************/
using System.ComponentModel.DataAnnotations;
namespace Cicm.Database.Models namespace Cicm.Database.Models
{ {
public class CompanyDescription public class CompanyDescription
{ {
public int Id { get; set; } public int Id { get; set; }
public int CompanyId { get; set; } public int CompanyId { get; set; }
[MaxLength(262144, ErrorMessage = "Description is too long")]
public string Text { get; set; } public string Text { get; set; }
public virtual Company Company { get; set; } public virtual Company Company { get; set; }

View File

@@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web"> <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework> <TargetFramework>netcoreapp2.2</TargetFramework>
<Version>3.0.99.418</Version> <Version>3.0.99.422</Version>
<Company>Canary Islands Computer Museum</Company> <Company>Canary Islands Computer Museum</Company>
<Copyright>Copyright © 2003-2018 Natalia Portillo</Copyright> <Copyright>Copyright © 2003-2018 Natalia Portillo</Copyright>
<Product>Canary Islands Computer Museum Website</Product> <Product>Canary Islands Computer Museum Website</Product>