From 5613acba1d3ef8b2c9661734a58b014e72073450 Mon Sep 17 00:00:00 2001 From: Bartosz Chyzy Date: Sat, 1 Dec 2018 22:43:44 +0100 Subject: [PATCH] =?UTF-8?q?Dodano=20walidacje=20maila=20zg=C5=82aszaj?= =?UTF-8?q?=C4=85cego=20post?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Forum.DataAccessLayer.Models.csproj | 1 + .../Forum.DataAccessLayer.Models/Question.cs | 2 + .../Forum.DataAccessLayer.csproj | 7 + ...1812012143359_Email validation.Designer.cs | 29 ++++ .../201812012143359_Email validation.cs | 16 +++ .../201812012143359_Email validation.resx | 126 ++++++++++++++++++ 6 files changed, 181 insertions(+) create mode 100644 Trunk/Server/Forum/Forum.DataAccessLayer/Migrations/201812012143359_Email validation.Designer.cs create mode 100644 Trunk/Server/Forum/Forum.DataAccessLayer/Migrations/201812012143359_Email validation.cs create mode 100644 Trunk/Server/Forum/Forum.DataAccessLayer/Migrations/201812012143359_Email validation.resx diff --git a/Trunk/Components/Forum.DataAccessLayer.Models/Forum.DataAccessLayer.Models.csproj b/Trunk/Components/Forum.DataAccessLayer.Models/Forum.DataAccessLayer.Models.csproj index 1b954e1..ce94bc2 100644 --- a/Trunk/Components/Forum.DataAccessLayer.Models/Forum.DataAccessLayer.Models.csproj +++ b/Trunk/Components/Forum.DataAccessLayer.Models/Forum.DataAccessLayer.Models.csproj @@ -44,6 +44,7 @@ ..\..\Server\Forum\packages\Microsoft.AspNet.Identity.EntityFramework.2.2.2\lib\net45\Microsoft.AspNet.Identity.EntityFramework.dll + diff --git a/Trunk/Components/Forum.DataAccessLayer.Models/Question.cs b/Trunk/Components/Forum.DataAccessLayer.Models/Question.cs index f9b2709..9152518 100644 --- a/Trunk/Components/Forum.DataAccessLayer.Models/Question.cs +++ b/Trunk/Components/Forum.DataAccessLayer.Models/Question.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -18,6 +19,7 @@ namespace Forum.DataAccessLayer.Models public bool IsClosed { get; set; } + [EmailAddress] public string ReportersEmail { get; set; } public Category Category { get; set; } diff --git a/Trunk/Server/Forum/Forum.DataAccessLayer/Forum.DataAccessLayer.csproj b/Trunk/Server/Forum/Forum.DataAccessLayer/Forum.DataAccessLayer.csproj index 09806a1..ee39d61 100644 --- a/Trunk/Server/Forum/Forum.DataAccessLayer/Forum.DataAccessLayer.csproj +++ b/Trunk/Server/Forum/Forum.DataAccessLayer/Forum.DataAccessLayer.csproj @@ -86,6 +86,10 @@ 201812012140435_Configure Db Tables.cs + + + 201812012143359_Email validation.cs + @@ -111,6 +115,9 @@ 201812012140435_Configure Db Tables.cs + + 201812012143359_Email validation.cs + \ No newline at end of file diff --git a/Trunk/Server/Forum/Forum.DataAccessLayer/Migrations/201812012143359_Email validation.Designer.cs b/Trunk/Server/Forum/Forum.DataAccessLayer/Migrations/201812012143359_Email validation.Designer.cs new file mode 100644 index 0000000..445ed7a --- /dev/null +++ b/Trunk/Server/Forum/Forum.DataAccessLayer/Migrations/201812012143359_Email validation.Designer.cs @@ -0,0 +1,29 @@ +// +namespace Forum.DataAccessLayer.Migrations +{ + using System.CodeDom.Compiler; + using System.Data.Entity.Migrations; + using System.Data.Entity.Migrations.Infrastructure; + using System.Resources; + + [GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")] + public sealed partial class Emailvalidation : IMigrationMetadata + { + private readonly ResourceManager Resources = new ResourceManager(typeof(Emailvalidation)); + + string IMigrationMetadata.Id + { + get { return "201812012143359_Email validation"; } + } + + string IMigrationMetadata.Source + { + get { return null; } + } + + string IMigrationMetadata.Target + { + get { return Resources.GetString("Target"); } + } + } +} diff --git a/Trunk/Server/Forum/Forum.DataAccessLayer/Migrations/201812012143359_Email validation.cs b/Trunk/Server/Forum/Forum.DataAccessLayer/Migrations/201812012143359_Email validation.cs new file mode 100644 index 0000000..eae6184 --- /dev/null +++ b/Trunk/Server/Forum/Forum.DataAccessLayer/Migrations/201812012143359_Email validation.cs @@ -0,0 +1,16 @@ +namespace Forum.DataAccessLayer.Migrations +{ + using System; + using System.Data.Entity.Migrations; + + public partial class Emailvalidation : DbMigration + { + public override void Up() + { + } + + public override void Down() + { + } + } +} diff --git a/Trunk/Server/Forum/Forum.DataAccessLayer/Migrations/201812012143359_Email validation.resx b/Trunk/Server/Forum/Forum.DataAccessLayer/Migrations/201812012143359_Email validation.resx new file mode 100644 index 0000000..6a89265 --- /dev/null +++ b/Trunk/Server/Forum/Forum.DataAccessLayer/Migrations/201812012143359_Email validation.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + H4sIAAAAAAAEAO1d227kuBF9D5B/EPSUBN5uXzKDidG9C2/b3hgZXzLtWeTNoCW6LYwuvRI1YyPYL8tDPim/EFJXXiVSUqvlTTAvbZGsKhYPi6wiWfOff/178cNL4FtfYZx4Ubi0j2aHtgVDJ3K9cLO0U/T03Qf7h+9//7vFhRu8WD+X9U5IPdwyTJb2M0Lb0/k8cZ5hAJJZ4DlxlERPaOZEwRy40fz48PAv86OjOcQkbEzLshaf0hB5Acz+wH+uotCBW5QC/zpyoZ8U33HJOqNq3YAAJlvgwKV9GcVpMDsHCJw5DkySj+AVxrZ15nsAC7OG/pNtgTCMEEBY1NPPCVyjOAo36y3+APz71y3E9Z6An8CiC6d1dd3eHB6T3szrhiUpJ01QFBgSPDop1DPnm3dSsl2pDyvwAisavZJeZ0pc2mdh8o0ojGd1uvJjUk2h4Vk+MrO8+YHVVOmgAgrGE/l3YK1SH6UxXIYwRTHwD6y79NH3nL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