diff --git a/MyWebsite/MyWebsite/Models/Project.cs b/MyWebsite/MyWebsite/Models/Project.cs index a5f17b0..a4d05ce 100644 --- a/MyWebsite/MyWebsite/Models/Project.cs +++ b/MyWebsite/MyWebsite/Models/Project.cs @@ -7,8 +7,7 @@ namespace MyWebsite.Models public class Project { [Key] - [DatabaseGenerated(DatabaseGeneratedOption.Identity)] - public Guid Id { get; set; } + public decimal Id { get; set; } [Required] [Column(TypeName = "varchar(100)")] diff --git a/MyWebsite/MyWebsite/Views/Resume/Print.cshtml b/MyWebsite/MyWebsite/Views/Resume/Print.cshtml index a007137..6decee9 100644 --- a/MyWebsite/MyWebsite/Views/Resume/Print.cshtml +++ b/MyWebsite/MyWebsite/Views/Resume/Print.cshtml @@ -9,8 +9,13 @@ diff --git a/MyWebsite/MyWebsite/Views/Shared/ContactsBlock.cshtml b/MyWebsite/MyWebsite/Views/Shared/ContactsBlock.cshtml index a3f6f21..ef4776a 100644 --- a/MyWebsite/MyWebsite/Views/Shared/ContactsBlock.cshtml +++ b/MyWebsite/MyWebsite/Views/Shared/ContactsBlock.cshtml @@ -1,7 +1,6 @@ -@using Newtonsoft.Json -@using System.Net -@{ - Dictionary links = JsonConvert.DeserializeObject>(new WebClient().DownloadString($"{Context.Request.Scheme}://{Context.Request.Host}/Links.json")); +@{ + Link email = Startup.Database.Links.FirstOrDefault(i => i.Name == "outlook"); + List links = Startup.Database.Links.Where(i => new string[] { "linkedin", "github", "twitter", "vkontakte" }.Contains(i.Name)).OrderBy(i => i.Id).ToList(); }
@@ -12,13 +11,16 @@ // All links are clickable
public void ConatactMe()
{
- string email = "mihcael.xfox@outlook.com";
+ @if(email != null) + { + string email = "@email.Username";
+ } Link[] socialNetworks = new Link[]
{
- new Link("LinkedIn", "https:@(links["linkedin"].Url)"),
- new Link("GitHub", "https:@(links["github"].Url)"),
- new Link("Twitter", "https:@(links["twitter"].Url)"),
- new Link("Vkontakte", "https:@(links["vk"].Url)")
+ @foreach(Link link in links) + { + new Link("@(link.Title)", "https:@(link.Url)"),
+ } }
}

diff --git a/MyWebsite/MyWebsite/Views/Shared/Index.cshtml b/MyWebsite/MyWebsite/Views/Shared/Index.cshtml index d2d19bd..b3b1ec2 100644 --- a/MyWebsite/MyWebsite/Views/Shared/Index.cshtml +++ b/MyWebsite/MyWebsite/Views/Shared/Index.cshtml @@ -2,7 +2,12 @@ ViewData["Title"] = "Home Page"; } -
-

Welcome

-

Learn about building Web apps with ASP.NET Core.

-
+
+

Hello, World!

+
+ +
+

+ Homepage +

+
\ No newline at end of file diff --git a/MyWebsite/MyWebsite/Views/Shared/Projects.cshtml b/MyWebsite/MyWebsite/Views/Shared/Projects.cshtml index 161516e..8bf403b 100644 --- a/MyWebsite/MyWebsite/Views/Shared/Projects.cshtml +++ b/MyWebsite/MyWebsite/Views/Shared/Projects.cshtml @@ -12,7 +12,7 @@
- @foreach (Project project in Startup.Database.Projects) + @foreach (Project project in Startup.Database.Projects.OrderByDescending(i => i.Id)) {
diff --git a/MyWebsite/MyWebsite/Views/Shared/_Layout.cshtml b/MyWebsite/MyWebsite/Views/Shared/_Layout.cshtml index 09ba094..ad501af 100644 --- a/MyWebsite/MyWebsite/Views/Shared/_Layout.cshtml +++ b/MyWebsite/MyWebsite/Views/Shared/_Layout.cshtml @@ -28,8 +28,8 @@ XFox111.NET