Add Project

parents
# Default ignored files
/shelf/
/workspace.xml
# Rider ignored files
/projectSettingsUpdater.xml
/contentModel.xml
/modules.xml
/.idea.StudyBlog.iml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
StudyBlog
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="UserContentModel">
<attachedFolders />
<explicitIncludes />
<explicitExcludes />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file

Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StudyBlog", "StudyBlog\StudyBlog.csproj", "{586E3569-FF54-4F42-A386-7DCC6B96F446}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{586E3569-FF54-4F42-A386-7DCC6B96F446}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{586E3569-FF54-4F42-A386-7DCC6B96F446}.Debug|Any CPU.Build.0 = Debug|Any CPU
{586E3569-FF54-4F42-A386-7DCC6B96F446}.Release|Any CPU.ActiveCfg = Release|Any CPU
{586E3569-FF54-4F42-A386-7DCC6B96F446}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
using System;
using System.IO;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Hosting;
using StudyBlog.Models;
using StudyBlog.Services;
using StudyBlog.ViewModels;
namespace StudyBlog.Controllers
{
public class AccountController : Controller
{
private readonly UserManager<User> _userManager;
private readonly RoleManager<IdentityRole> _roleManager;
private readonly SignInManager<User> _signInManager;
private readonly IHostEnvironment _environment; //Добавляем сервис взаимодействия с файлами в рамках хоста
private readonly UploadFileService _uploadFileService; // Добавляем сервис для получения файлов из формы
public AccountController(
UserManager<User> userManager,
RoleManager<IdentityRole> roleManager,
SignInManager<User> signInManager,
IHostEnvironment environment,
UploadFileService uploadFileService)
{
_userManager = userManager;
_roleManager = roleManager;
_signInManager = signInManager;
_environment = environment;
_uploadFileService = uploadFileService;
}
public IActionResult Register()
{
return View();
}
[Authorize]
public IActionResult Index(string id = null){
User user = id == null? _userManager.GetUserAsync(User).Result : _userManager.FindByIdAsync(id).Result;
return View(user);
}
[Authorize]
public IActionResult Edit(string id = null)
{
User user = null;
if (User.IsInRole("admin"))
{
user = id == null? _userManager.GetUserAsync(User).Result : _userManager.FindByIdAsync(id).Result;
}
else
{
user = _userManager.FindByIdAsync(id).Result;
}
UserEditViewModel model = new UserEditViewModel()
{
FirstName = user.FirstName,
SecondName = user.SecondName,
BirthDate = user.BirthDate,
Id = user.Id
};
return View(model);
}
[HttpPost]
[Authorize]
public async Task<IActionResult> Edit(UserEditViewModel model)
{
if (ModelState.IsValid)
{
User user = await _userManager.FindByIdAsync(model.Id);
if (user != null)
{
user.FirstName = model.FirstName;
user.SecondName = model.SecondName;
user.BirthDate = model.BirthDate;
var result = await _userManager.UpdateAsync(user);
if (result.Succeeded)
return RedirectToAction("Index");
foreach (var error in result.Errors)
ModelState.AddModelError("", error.Description);
}
}
return View(model);
}
[Authorize]
public async Task<IActionResult> ChangePassword(string id)
{
User user = await _userManager.FindByIdAsync(id);
if (user is null)
return NotFound();
ChangePasswordViewModel model = new ChangePasswordViewModel()
{
Id = user.Id,
Email = user.Email
};
return View(model);
}
[HttpPost]
[Authorize]
public async Task<IActionResult> ChangePassword(ChangePasswordViewModel model)
{
if (ModelState.IsValid)
{
User user = await _userManager.FindByIdAsync(model.Id);
if (user != null)
{
var passwordValidator = HttpContext.RequestServices.GetService(typeof(IPasswordValidator<User>)) as IPasswordValidator<User>;
var passwordHasher = HttpContext.RequestServices.GetService(typeof(IPasswordHasher<User>)) as IPasswordHasher<User>;
var result = await passwordValidator.ValidateAsync(_userManager, user, model.NewPassword);
if (result.Succeeded)
{
user.PasswordHash = passwordHasher.HashPassword(user, model.NewPassword);
await _userManager.UpdateAsync(user);
return RedirectToAction("Index");
}
foreach (var error in result.Errors)
ModelState.AddModelError("NewPassword", error.Description);
}
ModelState.AddModelError("", "Пользователь не существует");
}
return View(model);
}
[HttpPost]
public async Task<IActionResult> Register(RegisterViewModel model)
{
if (ModelState.IsValid)
{
string path = Path.Combine(_environment.ContentRootPath,"wwwroot/images/");
string photoPath = $"images/{model.File.FileName}";
_uploadFileService.Upload(path, model.File.FileName, model.File);
User user = new User
{
Email = model.Email,
UserName = model.Email,
BirthDate = model.DateOfBirth,
FirstName = model.FirstName,
SecondName = model.SecondName,
AvatarPath = photoPath
};
var result = await _userManager.CreateAsync(user, model.Password);
if (result.Succeeded)
{
await _signInManager.SignInAsync(user, false);
return RedirectToAction("Index", "Posts");
}
foreach (var error in result.Errors)
ModelState.AddModelError(String.Empty, error.Description);
}
return View(model);
}
public IActionResult Login(string returnUrl = null)
{
return View(new LoginViewModel {ReturnUrl = returnUrl});
}
[HttpPost]
public async Task<IActionResult> Login(LoginViewModel model)
{
if (ModelState.IsValid)
{
User user = await _userManager.FindByEmailAsync(model.Email);
var result = await _signInManager.PasswordSignInAsync(
user,
model.Password,
model.RememberMe,
false);
if (result.Succeeded)
{
if (!string.IsNullOrEmpty(model.ReturnUrl)&&
Url.IsLocalUrl(model.ReturnUrl))
{
return Redirect(model.ReturnUrl);
}
return RedirectToAction("Index", "Posts");
}
ModelState.AddModelError("", "Неправильный логин или пароль");
}
return View(model);
}
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Logout()
{
await _signInManager.SignOutAsync();
return RedirectToAction("Login");
}
}
}
\ No newline at end of file
using System.Net;
using Microsoft.AspNetCore.Mvc;
namespace StudyBlog.Controllers
{
public class ErrorsController : Controller
{
// GET
public IActionResult Index(int code)
{
switch (code)
{
case (int)HttpStatusCode.NotFound :
return View("NotFound");
default:
return RedirectToAction("Index", "Posts");
}
}
}
}
\ No newline at end of file
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Hosting;
using StudyBlog.Models;
using StudyBlog.Services;
using StudyBlog.ViewModels;
namespace StudyBlog.Controllers
{
public class PostsController : Controller
{
private BlogContext _db;
private readonly IHostEnvironment _environment;
private readonly UploadFileService _uploadFileService;
private UserManager<User> _userManager;
public PostsController(BlogContext db, IHostEnvironment environment, UploadFileService uploadFileService, UserManager<User> userManager)
{
_db = db;
_environment = environment;
_uploadFileService = uploadFileService;
_userManager = userManager;
}
public IActionResult Index()
{
List<Post> posts = _db.Posts.Where(p => !p.IsDeleted).ToList();
return View(posts);
}
[Authorize]
public IActionResult Create()
{
return View();
}
public async Task<IActionResult> Post(string id)
{
var post = await _db.Posts.FirstOrDefaultAsync(p => p.Id == id);
if (post != null)
return View(post);
return NotFound();
}
[Authorize]
[HttpPost]
public async Task<IActionResult> Create(CreatePostViewModel model)
{
if (ModelState.IsValid)
{
string path = Path.Combine(_environment.ContentRootPath,"wwwroot\\images\\userPosts\\");
string photoPath = $"images/userPosts/{model.File.FileName}";
_uploadFileService.Upload(path, model.File.FileName, model.File);
Post post = new Post()
{
Description = model.Description,
PhotoPath = photoPath,
UserId = _userManager.GetUserId(User)
};
var result = _db.Posts.AddAsync(post);
if (result.IsCompleted)
{
await _db.SaveChangesAsync();
return RedirectToAction("Index");
}
}
return View(model);
}
[Authorize]
public IActionResult Edit(string id)
{
Post post = _db.Posts.FirstOrDefault(p => p.Id == id);
if (post == null) return NotFound();
if (post.UserId != _userManager.GetUserId(User)) return Forbid();
var model = new EditPostViewModel()
{
Id = post.Id,
Description = post.Description,
PhotoPath = post.PhotoPath
};
return View(model);
}
[Authorize]
[HttpPost]
public async Task<IActionResult> Edit(EditPostViewModel model)
{
var post = _db.Posts.FirstOrDefault(p => p.Id == model.Id);
if (post == null) return NotFound();
if (post.UserId != _userManager.GetUserId(User)) return Forbid();
if (model.File != null)
{
string path = Path.Combine(_environment.ContentRootPath,"wwwroot\\images\\userPosts\\");
string photoPath = $"images/userPosts/{model.File.FileName}";
_uploadFileService.Upload(path, model.File.FileName, model.File);
post.PhotoPath = photoPath;
}
else
post.PhotoPath = model.PhotoPath;
post.Description = model.Description;
_db.Entry(post).State = EntityState.Modified;
_db.SaveChanges();
return RedirectToAction("Post", new{id = post.Id});
}
//TODO : Реализовать удаление для сущности поста!
// public IActionResult Delete(string id)
// {
//
// }
}
}
\ No newline at end of file
using System.Linq;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using StudyBlog.Models;
namespace StudyBlog.Controllers
{
[Authorize(Roles = "admin")]
public class UsersController : Controller
{
private UserManager<User> _userManager;
public UsersController(UserManager<User> userManager)
{
_userManager = userManager;
}
// GET
public IActionResult Index()
{
return View(_userManager.Users.ToList());
}
}
}
\ No newline at end of file
This diff is collapsed.
using System;
using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
namespace StudyBlog.Migrations
{
public partial class Initial : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "AspNetRoles",
columns: table => new
{
Id = table.Column<string>(nullable: false),
Name = table.Column<string>(maxLength: 256, nullable: true),
NormalizedName = table.Column<string>(maxLength: 256, nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AspNetRoles", x => x.Id);
});
migrationBuilder.CreateTable(
name: "AspNetUsers",
columns: table => new
{
Id = table.Column<string>(nullable: false),
UserName = table.Column<string>(maxLength: 256, nullable: true),
NormalizedUserName = table.Column<string>(maxLength: 256, nullable: true),
Email = table.Column<string>(maxLength: 256, nullable: true),
NormalizedEmail = table.Column<string>(maxLength: 256, nullable: true),
EmailConfirmed = table.Column<bool>(nullable: false),
PasswordHash = table.Column<string>(nullable: true),
SecurityStamp = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
PhoneNumber = table.Column<string>(nullable: true),
PhoneNumberConfirmed = table.Column<bool>(nullable: false),
TwoFactorEnabled = table.Column<bool>(nullable: false),
LockoutEnd = table.Column<DateTimeOffset>(nullable: true),
LockoutEnabled = table.Column<bool>(nullable: false),
AccessFailedCount = table.Column<int>(nullable: false),
BirthDate = table.Column<DateTime>(nullable: true),
CreatedAt = table.Column<DateTime>(nullable: false),
FirstName = table.Column<string>(nullable: true),
SecondName = table.Column<string>(nullable: true),
AvatarPath = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AspNetUsers", x => x.Id);
});
migrationBuilder.CreateTable(
name: "AspNetRoleClaims",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
RoleId = table.Column<string>(nullable: false),
ClaimType = table.Column<string>(nullable: true),
ClaimValue = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AspNetRoleClaims", x => x.Id);
table.ForeignKey(
name: "FK_AspNetRoleClaims_AspNetRoles_RoleId",
column: x => x.RoleId,
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "AspNetUserClaims",
columns: table => new
{
Id = table.Column<int>(nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
UserId = table.Column<string>(nullable: false),
ClaimType = table.Column<string>(nullable: true),
ClaimValue = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AspNetUserClaims", x => x.Id);
table.ForeignKey(
name: "FK_AspNetUserClaims_AspNetUsers_UserId",
column: x => x.UserId,
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "AspNetUserLogins",
columns: table => new
{
LoginProvider = table.Column<string>(nullable: false),
ProviderKey = table.Column<string>(nullable: false),
ProviderDisplayName = table.Column<string>(nullable: true),
UserId = table.Column<string>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_AspNetUserLogins", x => new { x.LoginProvider, x.ProviderKey });
table.ForeignKey(
name: "FK_AspNetUserLogins_AspNetUsers_UserId",
column: x => x.UserId,
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "AspNetUserRoles",
columns: table => new
{
UserId = table.Column<string>(nullable: false),
RoleId = table.Column<string>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_AspNetUserRoles", x => new { x.UserId, x.RoleId });
table.ForeignKey(
name: "FK_AspNetUserRoles_AspNetRoles_RoleId",
column: x => x.RoleId,
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_AspNetUserRoles_AspNetUsers_UserId",
column: x => x.UserId,
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "AspNetUserTokens",
columns: table => new
{
UserId = table.Column<string>(nullable: false),
LoginProvider = table.Column<string>(nullable: false),
Name = table.Column<string>(nullable: false),
Value = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AspNetUserTokens", x => new { x.UserId, x.LoginProvider, x.Name });
table.ForeignKey(
name: "FK_AspNetUserTokens_AspNetUsers_UserId",
column: x => x.UserId,
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_AspNetRoleClaims_RoleId",
table: "AspNetRoleClaims",
column: "RoleId");
migrationBuilder.CreateIndex(
name: "RoleNameIndex",
table: "AspNetRoles",
column: "NormalizedName",
unique: true);
migrationBuilder.CreateIndex(
name: "IX_AspNetUserClaims_UserId",
table: "AspNetUserClaims",
column: "UserId");
migrationBuilder.CreateIndex(
name: "IX_AspNetUserLogins_UserId",
table: "AspNetUserLogins",
column: "UserId");
migrationBuilder.CreateIndex(
name: "IX_AspNetUserRoles_RoleId",
table: "AspNetUserRoles",
column: "RoleId");
migrationBuilder.CreateIndex(
name: "EmailIndex",
table: "AspNetUsers",
column: "NormalizedEmail");
migrationBuilder.CreateIndex(
name: "UserNameIndex",
table: "AspNetUsers",
column: "NormalizedUserName",
unique: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "AspNetRoleClaims");
migrationBuilder.DropTable(
name: "AspNetUserClaims");
migrationBuilder.DropTable(
name: "AspNetUserLogins");
migrationBuilder.DropTable(
name: "AspNetUserRoles");
migrationBuilder.DropTable(
name: "AspNetUserTokens");
migrationBuilder.DropTable(
name: "AspNetRoles");
migrationBuilder.DropTable(
name: "AspNetUsers");
}
}
}
This diff is collapsed.
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace StudyBlog.Migrations
{
public partial class AddPostEntity : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Posts",
columns: table => new
{
Id = table.Column<string>(nullable: false),
IsDeleted = table.Column<bool>(nullable: false),
IsBlocked = table.Column<bool>(nullable: false),
CreatedAt = table.Column<DateTime>(nullable: false),
UpdatedAt = table.Column<DateTime>(nullable: true),
Description = table.Column<string>(nullable: true),
PhotoPath = table.Column<string>(nullable: true),
UserId = table.Column<string>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Posts", x => x.Id);
table.ForeignKey(
name: "FK_Posts_AspNetUsers_UserId",
column: x => x.UserId,
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateIndex(
name: "IX_Posts_UserId",
table: "Posts",
column: "UserId");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Posts");
}
}
}
This diff is collapsed.
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
namespace StudyBlog.Models
{
public class BlogContext : IdentityDbContext<User>
{
public override DbSet<User> Users { get; set; }
public DbSet<Post> Posts { get; set; }
public BlogContext(DbContextOptions options) : base(options)
{
}
}
}
\ No newline at end of file
using System;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.AspNetCore.Http;
namespace StudyBlog.Models
{
public class Post
{
public string Id { get; set; } = Guid.NewGuid().ToString();
public bool IsDeleted { get; set; } = false;
public bool IsBlocked { get; set; } = false;
public DateTime CreatedAt { get; set; } = DateTime.Now;
public DateTime? UpdatedAt { get; set; }
public string Description { get; set; }
public string PhotoPath { get; set; }
public string UserId { get; set; }
public virtual User User { get; set; }
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Microsoft.AspNetCore.Identity;
namespace StudyBlog.Models
{
public class User : IdentityUser
{
public DateTime? BirthDate { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.Now;
public string FirstName { get; set; }
public string? SecondName { get; set; }
public string AvatarPath { get; set; }
public virtual List<Post> Posts { get; set; }
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using StudyBlog.Models;
using StudyBlog.Services;
namespace StudyBlog
{
public class Program
{
public static async Task Main(string[] args)
{
var host = CreateHostBuilder(args).Build();
AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true);
using var scope = host.Services.CreateScope();
var services = scope.ServiceProvider;
try
{
var userManager = services.GetRequiredService<UserManager<User>>();
var roleManager = services.GetRequiredService<RoleManager<IdentityRole>>();
await RoleInitializer.Initialize(roleManager, userManager);
}
catch (Exception e)
{
var logger = services.GetRequiredService<ILogger<Program>>();
logger.LogError(e, "Возникло исключение при инициализации ролей");
}
host.Run();
}
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup<Startup>(); });
}
}
\ No newline at end of file
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:38942",
"sslPort": 44358
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"StudyBlog": {
"commandName": "Project",
"launchBrowser": true,
"applicationUrl": "http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
using System.Threading.Tasks;
using Microsoft.AspNetCore.Identity;
using StudyBlog.Models;
namespace StudyBlog.Services
{
public class RoleInitializer
{
public static async Task Initialize(
RoleManager<IdentityRole> roleManager,
UserManager<User> userManager)
{
string adminEmail = "admin@admin.com";
string adminPassword = "1qaz@WSX29";
var roles = new[] {"admin", "user"};
foreach (var role in roles)
{
if (await roleManager.FindByNameAsync(role) is null)
await roleManager.CreateAsync(new IdentityRole(role));
}
if (await userManager.FindByNameAsync(adminEmail) is null)
{
User admin = new User
{
Email = adminEmail,
UserName = adminEmail
};
var result = await userManager.CreateAsync(admin, adminPassword);
if (result.Succeeded)
await userManager.AddToRoleAsync(admin, "admin");
}
}
}
}
\ No newline at end of file
using System.IO;
using Microsoft.AspNetCore.Http;
namespace StudyBlog.Services
{
public class UploadFileService
{
public async void Upload(string path, string fileName, IFormFile file)
{
using var stream = new FileStream(Path.Combine(path, fileName), FileMode.Create);
await file.CopyToAsync(stream);
}
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.HttpsPolicy;
using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using StudyBlog.Models;
using StudyBlog.Services;
namespace StudyBlog
{
public class Startup
{
public Startup(IConfiguration configuration)
{
Configuration = configuration;
}
public IConfiguration Configuration { get; }
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddControllersWithViews();
services.AddTransient<UploadFileService>();
string connection = Configuration.GetConnectionString("DefaultConnection");
services.AddDbContext<BlogContext>(options =>
options.UseLazyLoadingProxies()
.UseNpgsql(connection))
.AddIdentity<User, IdentityRole>(
options =>
{
options.Password.RequireDigit = false; //Требуются ли цифры
options.Password.RequiredLength = 5; //Требуемая длина пароля
options.Password.RequireLowercase = false; // Требуются ли символы в нижнем регистре
options.Password.RequireUppercase = false; //Требуются ли символы в верхнем регистре
options.Password.RequiredUniqueChars = 1; //Количество уникальных символов в пароле
options.Password.RequireNonAlphanumeric = false; //Требуются ли неалфавитно-цифровые символы
})
.AddEntityFrameworkStores<BlogContext>();
services.ConfigureApplicationCookie(options => options.LoginPath = "/Account/Login");
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
else
{
app.UseExceptionHandler("/Home/Error");
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseStatusCodePagesWithRedirects("/Errors/?code={0}");
app.UseRouting();
app.UseAuthentication();
app.UseAuthorization();
app.UseCookiePolicy();
app.UseEndpoints(endpoints =>
{
endpoints.MapControllerRoute(
name: "default",
pattern: "{controller=Posts}/{action=Index}/{id?}");
});
}
}
}
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>9</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.6">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="6.0.6" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.5" />
</ItemGroup>
</Project>
using System.ComponentModel.DataAnnotations;
namespace StudyBlog.ViewModels
{
public class ChangePasswordViewModel
{
public string Id { get; set; }
[Required(ErrorMessage = "Обязательно укажите email")]
public string Email { get; set; }
[Required(ErrorMessage = "Это поле обязательно для заполнения")]
public string NewPassword { get; set; }
}
}
\ No newline at end of file
using System.ComponentModel.DataAnnotations;
using Microsoft.AspNetCore.Http;
namespace StudyBlog.ViewModels
{
public class CreatePostViewModel
{
[Required(ErrorMessage = "Поле описание обязательно для заполнения")]
[MinLength(10, ErrorMessage = "Минимальная длина описания 10 символов")]
[Display(Name = "Описание")]
[DataType(DataType.Text)]
public string Description { get; set; }
[Required(ErrorMessage = "Загрузка фото обязательна")]
[DataType(DataType.Upload)]
[Display(Name = "Изображение публикации")]
public IFormFile File { get; set; }
}
}
\ No newline at end of file
using System.ComponentModel.DataAnnotations;
using Microsoft.AspNetCore.Http;
namespace StudyBlog.ViewModels
{
public class EditPostViewModel
{
public string Id { get; set; }
[Required(ErrorMessage = "Поле описание обязательно для заполнения")]
[MinLength(10, ErrorMessage = "Минимальная длина описания 10 символов")]
[Display(Name = "Описание")]
[DataType(DataType.Text)]
public string Description { get; set; }
public string PhotoPath { get; set; }
[DataType(DataType.Upload)]
[Display(Name = "Изображение публикации")]
public IFormFile File { get; set; }
}
}
\ No newline at end of file
using System;
namespace StudyBlog.Models
{
public class ErrorViewModel
{
public string RequestId { get; set; }
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
}
}
\ No newline at end of file
using System.ComponentModel.DataAnnotations;
namespace StudyBlog.ViewModels
{
public class LoginViewModel
{
[Required(ErrorMessage = "Это поле обязательно")]
[Display(Name = "Электронная почта")]
[DataType(DataType.EmailAddress)]
public string Email { get; set; }
[Required(ErrorMessage = "Это поле обязательно")]
[Display(Name = "Пароль")]
[DataType(DataType.Password)]
public string Password { get; set; }
[Display(Name = "Запомнить меня")]
public bool RememberMe { get; set; }
public string ReturnUrl { get; set; }
}
}
\ No newline at end of file
using System;
using System.ComponentModel.DataAnnotations;
using Microsoft.AspNetCore.Http;
namespace StudyBlog.ViewModels
{
public class RegisterViewModel
{
[Required(ErrorMessage = "Это поле обязательно")]
[Display(Name = "Электронная почта")]
[DataType(DataType.EmailAddress)]
public string Email { get; set; }
[Required(ErrorMessage = "Это поле обязательно")]
[Display(Name = "Дата рождения")]
[DataType(DataType.Date)]
public DateTime DateOfBirth { get; set; }
[Required(ErrorMessage = "Это поле обязательно")]
[Display(Name = "Имя")]
[DataType(DataType.Text)]
public string FirstName { get; set; }
[Display(Name = "Фамилия")]
[DataType(DataType.Text)]
public string SecondName { get; set; }
[Required(ErrorMessage = "Загрузка фото обязательна")]
[DataType(DataType.Upload)]
[Display(Name = "Фото профиля")]
public IFormFile File { get; set; }
[Required(ErrorMessage = "Это поле обязательно")]
[Display(Name = "Пароль")]
[DataType(DataType.Password)]
public string Password { get; set; }
[Required(ErrorMessage = "Это поле обязательно")]
[Display(Name = "Введите пароль повторно")]
[DataType(DataType.Password)]
[Compare("Password", ErrorMessage = "Пароли не совпадают")]
public string ConfirmPassword { get; set; }
}
}
\ No newline at end of file
using System;
using System.ComponentModel.DataAnnotations;
namespace StudyBlog.ViewModels
{
public class UserEditViewModel
{
[Required(ErrorMessage = "Обязательно установите дату")]
public DateTime? BirthDate { get; set; }
[Required(ErrorMessage = "Обязательно укажите имя")]
public string FirstName { get; set; }
[MinLength(2, ErrorMessage = "Мнимальная длина 2 символа")]
public string? SecondName { get; set; }
public string Id { get; set; }
}
}
\ No newline at end of file
@model StudyBlog.ViewModels.ChangePasswordViewModel
@{
ViewBag.Title = "Профиль пользователя";
Layout = "_Layout";
}
<h2>Изменение пароля</h2>
<div class="row">
<div class="col-md-5">
<form asp-action="ChangePassword" method="post">
<div class="form-group">
<label asp-for="NewPassword">Новый пароль</label>
<input class="form-control" asp-for="NewPassword" type="password">
<span asp-validation-for="NewPassword"></span>
</div>
<input type="hidden" asp-for="Id"/>
<input type="hidden" asp-for="Email">
<input type="submit" value="Сохранить" class="btn btn-outline-dark">
</form>
</div>
</div>
\ No newline at end of file
@model StudyBlog.ViewModels.UserEditViewModel
@{
ViewBag.Title = "Профиль пользователя";
Layout = "_Layout";
}
<h2>Редактирование профиля</h2>
<div class="row">
<div class="col-md-5">
<form asp-action="Edit" method="post">
<div class="form-group">
<label asp-for="FirstName">Имя пользователя</label>
<input class="form-control" asp-for="FirstName" type="text">
<span asp-validation-for="FirstName"></span>
</div>
<div class="form-group">
<label asp-for="SecondName">Фамилия пользователя </label>
<input class="form-control" asp-for="SecondName" type="text">
<span asp-validation-for="SecondName"></span>
</div>
<div class="form-group">
<label asp-for="BirthDate">Дата рождения</label>
<input class="form-control" asp-for="BirthDate" type="date">
<span asp-validation-for="BirthDate"></span>
</div>
<input type="hidden" value="@Model.Id"/>
<input type="submit" value="Изменить" class="btn btn-outline-dark">
</form>
</div>
</div>
@using Microsoft.AspNetCore.Identity
@model User
@inject UserManager<User> UserManager
@{
ViewBag.Title = "Профиль пользователя";
Layout = "_Layout";
}
<div class="twPc-div">
<a class="twPc-bg twPc-block"></a>
<div style="padding: 10px;">
<a asp-action="Index" asp-controller="Account" asp-route-id="@Model.Id">
<img alt="@Model.FirstName" src="~/@Model.AvatarPath" class="twPc-avatarImg">
</a>
@if (UserManager.GetUserId(User) == Model.Id)
{
<a asp-action="Edit" asp-route-id="@Model.Id" class="btn btn-outline-info">Изменить</a>
<a asp-action="ChangePassword" asp-route-id="@Model.Id" class="btn btn-outline-danger">Изменить пароль</a>
}
<div class="twPc-divUser">
<div class="twPc-divName">
<a asp-action="Index" asp-controller="Account" asp-route-id="@Model.Id">
@Model.FirstName @Model.SecondName
</a>
</div>
</div>
<div class="twPc-divStats">
<ul class="twPc-Arrange">
<li class="twPc-ArrangeSizeFit">
<a asp-action="Index" asp-controller="Account" asp-route-id="@Model.Id" title="@Model.Posts.Count Публикаций">
<span class="twPc-StatLabel twPc-block">Публикаций</span>
<span class="twPc-StatValue">@Model.Posts.Count</span>
</a>
</li>
<li class="twPc-ArrangeSizeFit">
<a href="#" title="885 Following">
<span class="twPc-StatLabel twPc-block">Подписок</span>
<span class="twPc-StatValue">885</span>
</a>
</li>
<li class="twPc-ArrangeSizeFit">
<a href="#" title="1.810 Followers">
<span class="twPc-StatLabel twPc-block">Подписчиков</span>
<span class="twPc-StatValue">1.810</span>
</a>
</li>
</ul>
</div>
</div>
</div>
<div class="row justify-content-center userPosts">
<div class="col-md-6">
@foreach (var post in Model.Posts)
{
{
await Html.RenderPartialAsync("PartialViews/PostPartialView", post);
}
}
</div>
</div>
@model StudyBlog.ViewModels.LoginViewModel
@{
ViewBag.Title = "Вход";
Layout = "_Layout";
}
<h2>Введите данные для входа</h2>
<div class="row justify-content-center">
<div class="col-md-6">
<form method="post" asp-controller="Account" asp-action="Login"
asp-route-returnUrl="@Model.ReturnUrl">
<div asp-validation-summary="ModelOnly"></div>
<div class="form-group">
<label asp-for="Email"></label><br/>
<input class="form-control" asp-for="Email"/>
<span asp-validation-for="Email"></span>
</div>
<div class="form-group">
<label asp-for="Password"></label><br/>
<input class="form-control" asp-for="Password"/>
<span asp-validation-for="Password"></span>
</div>
<div class="form-group">
<label asp-for="RememberMe"></label>
<input class="form-check-inline" asp-for="RememberMe"/>
</div>
<div class="form-group">
<input class="form-control" type="submit" value="Войти"/>
</div>
</form>
</div>
</div>
@model StudyBlog.ViewModels.RegisterViewModel
@{
ViewBag.Title = "Регистрация";
Layout = "_Layout";
}
<h2>Регистрация нового пользователя</h2>
<div class="row justify-content-center">
<div class="col-md-6">
<form method="post" asp-controller="Account" asp-action="Register" enctype="multipart/form-data">
<div asp-validation-summary="ModelOnly"></div>
<div class="form-group">
<label asp-for="Email"></label><br/>
<input class="form-control" asp-for="Email"/>
<span asp-validation-for="Email"></span>
</div>
<div class="form-group">
<label asp-for="FirstName"></label><br/>
<input class="form-control" asp-for="FirstName"/>
<span asp-validation-for="FirstName"></span>
</div>
<div class="form-group">
<label asp-for="SecondName"></label><br/>
<input class="form-control" asp-for="SecondName"/>
<span asp-validation-for="SecondName"></span>
</div>
<div class="form-group">
<label asp-for="DateOfBirth"></label><br />
<input class="form-control" asp-for="DateOfBirth"/>
<span asp-validation-for="DateOfBirth"></span>
</div>
<div class="form-group">
<label asp-for="File"></label><br />
<input class="form-control-file" asp-for="File"/>
<span asp-validation-for="File"></span>
</div>
<div class="form-group">
<label asp-for="Password"></label><br />
<input class="form-control" asp-for="Password" />
<span asp-validation-for="Password"></span>
</div>
<div class="form-group">
<label asp-for="ConfirmPassword"></label><br />
<input class="form-control" asp-for="ConfirmPassword" />
<span asp-validation-for="ConfirmPassword"></span>
</div>
<div>
<input class="form-control" type="submit" value="Регистрация" />
</div>
</form>
</div>
</div>
@{
ViewBag.Title = "404 Страница не найдена";
Layout = "_Layout";
}
<div class="box">
<div class="box__ghost">
<div class="symbol"></div>
<div class="symbol"></div>
<div class="symbol"></div>
<div class="symbol"></div>
<div class="symbol"></div>
<div class="symbol"></div>
<div class="box__ghost-container">
<div class="box__ghost-eyes">
<div class="box__eye-left"></div>
<div class="box__eye-right"></div>
</div>
<div class="box__ghost-bottom">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
<div class="box__ghost-shadow"></div>
</div>
<div class="box__description">
<div class="box__description-container">
<div class="box__description-title">Упс!</div>
<div class="box__description-text">Видимо то, что вы искали не существует</div>
</div>
<a asp-action="Index" asp-controller="Posts" target="_blank" class="box__button">На главную</a>
</div>
</div>
@section Scripts
{
<script >
var pageX = $(document).width();
var pageY = $(document).height();
var mouseY=0;
var mouseX=0;
$(document).mousemove(function( event ) {
//verticalAxis
mouseY = event.pageY;
yAxis = (pageY/2-mouseY)/pageY*300;
//horizontalAxis
mouseX = event.pageX / -pageX;
xAxis = -mouseX * 100 - 100;
$('.box__ghost-eyes').css({ 'transform': 'translate('+ xAxis +'%,-'+ yAxis +'%)' });
//console.log('X: ' + xAxis);
});
</script>
}
@model StudyBlog.ViewModels.CreatePostViewModel
@{
ViewBag.Title = "Новая публикация";
Layout = "_Layout";
}
<h2>Заполните форму для создания публикации</h2>
<div class="row justify-content-center">
<div class="col-md-6">
<form method="post" asp-controller="Posts" asp-action="Create" enctype="multipart/form-data">
<div asp-validation-summary="ModelOnly"></div>
<div class="form-group">
<label asp-for="Description"></label><br/>
<input class="form-control" asp-for="Description"/>
<span asp-validation-for="Description"></span>
</div>
<div class="form-group">
<label asp-for="File"></label><br />
<input class="form-control-file" asp-for="File"/>
<span asp-validation-for="File"></span>
</div>
<div>
<input class="form-control" type="submit" value="Опубликовать" />
</div>
</form>
</div>
</div>
\ No newline at end of file
@model StudyBlog.ViewModels.EditPostViewModel
@{
ViewBag.Title = "Изменение публикации";
Layout = "_Layout";
}
<div class="row justify-content-center">
<div class="col-md-6">
<form method="post" asp-controller="Posts" asp-action="Edit" enctype="multipart/form-data">
<div asp-validation-summary="ModelOnly"></div>
<div class="form-group">
<label asp-for="Description"></label><br/>
<input class="form-control" asp-for="Description"/>
<span asp-validation-for="Description"></span>
</div>
<div class="form-group">
<label asp-for="File"></label><br />
<input class="form-control-file" asp-for="File"/>
<span asp-validation-for="File"></span>
</div>
<input type="hidden" asp-for="PhotoPath">
<input type="hidden" asp-for="Id">
<div>
<input class="form-control" type="submit" value="Сохранить" />
</div>
</form>
</div>
</div>
@model List<Post>
@{
ViewBag.Title = "Публикации пользователей";
Layout = "_Layout";
}
<h2>Все записи</h2>
<a asp-action="Create" class="btn btn-outline-info">Новая публикация</a>
<div class="row justify-content-center">
<div class="col-md-6">
@foreach (var post in Model)
{
{
await Html.RenderPartialAsync("PartialViews/PostPartialView", post);
}
}
</div>
</div>
\ No newline at end of file
@model Post
@{
ViewBag.Title = "Публикация";
Layout = "_Layout";
}
@{
await Html.RenderPartialAsync("PartialViews/PostPartialView", Model);
}
\ No newline at end of file
@model ErrorViewModel
@{
ViewData["Title"] = "Error";
}
<h1 class="text-danger">Error.</h1>
<h2 class="text-danger">An error occurred while processing your request.</h2>
@if (Model.ShowRequestId)
{
<p>
<strong>Request ID:</strong> <code>@Model.RequestId</code>
</p>
}
<h3>Development Mode</h3>
<p>
Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred.
</p>
<p>
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
It can result in displaying sensitive information from exceptions to end users.
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
and restarting the app.
</p>
@using Microsoft.AspNetCore.Identity
@inject UserManager<User> UserManager
@model Post
<div class="tweetEntry">
<div class="tweetEntry-content">
<a asp-action="Index" asp-controller="Account" asp-route-id="@Model.User.Id">
<img class="tweetEntry-avatar" src="~/@Model.User.AvatarPath" alt="user avatar">
<strong class="tweetEntry-fullname">
@Model.User.FirstName @Model.User.SecondName
</strong>
<br>
<span class="tweetEntry-username">
<b>@Model.User.UserName</b>
</span>
<span class="tweetEntry-timestamp">- @Model.CreatedAt.ToShortDateString()</span>
</a>
<p>
@if (UserManager.GetUserId(User) == Model.UserId)
{
<a class="btn btn-outline-dark" asp-action="Edit" asp-controller="Posts" asp-route-id="@Model.Id">Редактировать</a>
}
</p>
<div class="tweetEntry-text-container">
@Model.Description
</div>
</div>
<div class="optionalMedia">
<a asp-action="Post" asp-controller="Posts" asp-route-id="@Model.Id">
<img class="optionalMedia-img" src="~/@Model.PhotoPath" alt="post image">
</a>
</div>
<div class="tweetEntry-action-list" style="line-height:24px;color: #b1bbc3;">
<i class="fa fa-heart" style="width: 80px"></i>
</div>
</div>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>@ViewData["Title"] - StudyBlog</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
<link rel="stylesheet" href="~/css/site.css" />
</head>
<body>
<header>
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
<div class="container">
<a class="navbar-brand" asp-area="" asp-controller="Posts" asp-action="Index">StudyBlog</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target=".navbar-collapse" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<li class="navbar-collapse collapse d-sm-inline-flex ">
<ul class="navbar-nav flex-grow-1">
@if (User.IsInRole("admin"))
{
<li class="admin_group">
<a asp-action="Index" asp-controller="Users" class="btn btn-info">Список пользователей</a>
</li>
}
</ul>
<div class="login_group">
@if (User.Identity.IsAuthenticated)
{
<form asp-action="Logout" asp-controller="Account" method="post" asp-antiforgery="true">
<a asp-action="Index" asp-controller="Account">
<i class="fa fa-user fa-2x" style="margin-right: 10px;" aria-hidden="true"></i>
</a>
<input type="submit" value="Выход" class="brn btn-dark">
</form>
}
else
{
<a asp-action="Login" asp-controller="Account">Вход</a>
<a asp-action="Register" asp-controller="Account">Регистрация</a>
}
</div>
</div>
</nav>
</header>
<div class="container">
<main role="main" class="pb-3">
@RenderBody()
</main>
</div>
<footer class="border-top footer text-muted">
<div class="container">
&copy; 2020 - StudyBlog
</div>
</footer>
<script src="~/lib/jquery/dist/jquery.min.js"></script>
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
<script src="~/js/site.js" asp-append-version="true"></script>
@RenderSection("Scripts", required: false)
</body>
</html>
<script src="~/lib/jquery-validation/dist/jquery.validate.min.js"></script>
<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js"></script>
@model List<User>
@{
ViewBag.Title = "Пользователи";
Layout = "_Layout";
}
<h2>Список пользователей</h2>
<div class="row">
<table class="table">
<tr>
<th>Имя</th>
<th>Фамилия</th>
<th>Электронный адрес</th>
<th>Дата рождения</th>
<th>Дата создания</th>
<th>Ссылка на профиль</th>
</tr>
@foreach (var user in Model)
{
<tr>
<td>@user.FirstName</td>
<td>@user.SecondName</td>
<td>@user.Email</td>
<td>
@if (user.BirthDate != null)
{
@user.BirthDate.Value.ToShortDateString()
}
</td>
<td>@user.CreatedAt.ToShortDateString()</td>
<td>
<a asp-action="Index" asp-controller="Account" asp-route-id="@user.Id">Профиль пользователя</a>
</td>
</tr>
}
</table>
</div>
@using StudyBlog
@using StudyBlog.Models
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@{
Layout = "_Layout";
}
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
}
}
{
"ConnectionStrings":
{
"DefaultConnection" : "Server=127.0.0.1;Port=5432;Database=MyStudyBlog;User Id=postgres;Password=733362"
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*"
}
This diff is collapsed.
{
"runtimeOptions": {
"tfm": "net6.0",
"frameworks": [
{
"name": "Microsoft.NETCore.App",
"version": "6.0.0"
},
{
"name": "Microsoft.AspNetCore.App",
"version": "6.0.0"
}
],
"configProperties": {
"System.GC.Server": true,
"System.Reflection.NullabilityInfoContext.IsSupported": true,
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
}
}
}
\ No newline at end of file
{"ContentRoots":["/home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog/wwwroot/"],"Root":{"Children":{"css":{"Children":{"site.css":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"css/site.css"},"Patterns":null}},"Asset":null,"Patterns":null},"favicon.ico":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"favicon.ico"},"Patterns":null},"images":{"Children":{"Cat.jpg":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"images/Cat.jpg"},"Patterns":null},"IMG_4054.jpg":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"images/IMG_4054.jpg"},"Patterns":null},"userPosts":{"Children":{"boyarsky.jpg":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"images/userPosts/boyarsky.jpg"},"Patterns":null}},"Asset":null,"Patterns":null}},"Asset":null,"Patterns":null},"js":{"Children":{"site.js":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"js/site.js"},"Patterns":null}},"Asset":null,"Patterns":null},"lib":{"Children":{"bootstrap":{"Children":{"dist":{"Children":{"css":{"Children":{"bootstrap-grid.css":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/bootstrap/dist/css/bootstrap-grid.css"},"Patterns":null},"bootstrap-grid.css.map":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/bootstrap/dist/css/bootstrap-grid.css.map"},"Patterns":null},"bootstrap-grid.min.css":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/bootstrap/dist/css/bootstrap-grid.min.css"},"Patterns":null},"bootstrap-grid.min.css.map":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/bootstrap/dist/css/bootstrap-grid.min.css.map"},"Patterns":null},"bootstrap-reboot.css":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/bootstrap/dist/css/bootstrap-reboot.css"},"Patterns":null},"bootstrap-reboot.css.map":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/bootstrap/dist/css/bootstrap-reboot.css.map"},"Patterns":null},"bootstrap-reboot.min.css":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/bootstrap/dist/css/bootstrap-reboot.min.css"},"Patterns":null},"bootstrap-reboot.min.css.map":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/bootstrap/dist/css/bootstrap-reboot.min.css.map"},"Patterns":null},"bootstrap.css":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/bootstrap/dist/css/bootstrap.css"},"Patterns":null},"bootstrap.css.map":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/bootstrap/dist/css/bootstrap.css.map"},"Patterns":null},"bootstrap.min.css":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/bootstrap/dist/css/bootstrap.min.css"},"Patterns":null},"bootstrap.min.css.map":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/bootstrap/dist/css/bootstrap.min.css.map"},"Patterns":null}},"Asset":null,"Patterns":null},"js":{"Children":{"bootstrap.bundle.js":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/bootstrap/dist/js/bootstrap.bundle.js"},"Patterns":null},"bootstrap.bundle.js.map":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/bootstrap/dist/js/bootstrap.bundle.js.map"},"Patterns":null},"bootstrap.bundle.min.js":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/bootstrap/dist/js/bootstrap.bundle.min.js"},"Patterns":null},"bootstrap.bundle.min.js.map":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/bootstrap/dist/js/bootstrap.bundle.min.js.map"},"Patterns":null},"bootstrap.js":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/bootstrap/dist/js/bootstrap.js"},"Patterns":null},"bootstrap.js.map":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/bootstrap/dist/js/bootstrap.js.map"},"Patterns":null},"bootstrap.min.js":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/bootstrap/dist/js/bootstrap.min.js"},"Patterns":null},"bootstrap.min.js.map":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/bootstrap/dist/js/bootstrap.min.js.map"},"Patterns":null}},"Asset":null,"Patterns":null}},"Asset":null,"Patterns":null},"LICENSE":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/bootstrap/LICENSE"},"Patterns":null}},"Asset":null,"Patterns":null},"jquery-validation-unobtrusive":{"Children":{"jquery.validate.unobtrusive.js":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js"},"Patterns":null},"jquery.validate.unobtrusive.min.js":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js"},"Patterns":null},"LICENSE.txt":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/jquery-validation-unobtrusive/LICENSE.txt"},"Patterns":null}},"Asset":null,"Patterns":null},"jquery-validation":{"Children":{"dist":{"Children":{"additional-methods.js":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/jquery-validation/dist/additional-methods.js"},"Patterns":null},"additional-methods.min.js":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/jquery-validation/dist/additional-methods.min.js"},"Patterns":null},"jquery.validate.js":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/jquery-validation/dist/jquery.validate.js"},"Patterns":null},"jquery.validate.min.js":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/jquery-validation/dist/jquery.validate.min.js"},"Patterns":null}},"Asset":null,"Patterns":null},"LICENSE.md":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/jquery-validation/LICENSE.md"},"Patterns":null}},"Asset":null,"Patterns":null},"jquery":{"Children":{"dist":{"Children":{"jquery.js":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/jquery/dist/jquery.js"},"Patterns":null},"jquery.min.js":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/jquery/dist/jquery.min.js"},"Patterns":null},"jquery.min.map":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/jquery/dist/jquery.min.map"},"Patterns":null}},"Asset":null,"Patterns":null},"LICENSE.txt":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/jquery/LICENSE.txt"},"Patterns":null}},"Asset":null,"Patterns":null}},"Asset":null,"Patterns":null}},"Asset":null,"Patterns":[{"ContentRootIndex":0,"Pattern":"**","Depth":0}]}}
\ No newline at end of file
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
}
}
{
"ConnectionStrings":
{
"DefaultConnection" : "Server=127.0.0.1;Port=5432;Database=MyStudyBlog;User Id=postgres;Password=733362"
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*"
}
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v6.0", FrameworkDisplayName = "")]
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("StudyBlog")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("StudyBlog")]
[assembly: System.Reflection.AssemblyTitleAttribute("StudyBlog")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// Создано классом WriteCodeFragment MSBuild.
is_global = true
build_property.TargetFramework = net6.0
build_property.TargetPlatformMinVersion =
build_property.UsingMicrosoftNETSdkWeb = true
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = StudyBlog
build_property.RootNamespace = StudyBlog
build_property.ProjectDir = /home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog/
build_property.RazorLangVersion = 6.0
build_property.SupportLocalizedComponentNames =
build_property.GenerateRazorMetadataSourceChecksumAttributes =
build_property.MSBuildProjectDirectory = /home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog
build_property._RazorSourceGeneratorDebug =
[/home/valentin/Документы/work/c\#7/esdp/less5/Test/StudyBlog/Views/Account/ChangePassword.cshtml]
build_metadata.AdditionalFiles.TargetPath = Vmlld3MvQWNjb3VudC9DaGFuZ2VQYXNzd29yZC5jc2h0bWw=
build_metadata.AdditionalFiles.CssScope =
[/home/valentin/Документы/work/c\#7/esdp/less5/Test/StudyBlog/Views/Account/Edit.cshtml]
build_metadata.AdditionalFiles.TargetPath = Vmlld3MvQWNjb3VudC9FZGl0LmNzaHRtbA==
build_metadata.AdditionalFiles.CssScope =
[/home/valentin/Документы/work/c\#7/esdp/less5/Test/StudyBlog/Views/Account/Index.cshtml]
build_metadata.AdditionalFiles.TargetPath = Vmlld3MvQWNjb3VudC9JbmRleC5jc2h0bWw=
build_metadata.AdditionalFiles.CssScope =
[/home/valentin/Документы/work/c\#7/esdp/less5/Test/StudyBlog/Views/Account/Login.cshtml]
build_metadata.AdditionalFiles.TargetPath = Vmlld3MvQWNjb3VudC9Mb2dpbi5jc2h0bWw=
build_metadata.AdditionalFiles.CssScope =
[/home/valentin/Документы/work/c\#7/esdp/less5/Test/StudyBlog/Views/Account/Register.cshtml]
build_metadata.AdditionalFiles.TargetPath = Vmlld3MvQWNjb3VudC9SZWdpc3Rlci5jc2h0bWw=
build_metadata.AdditionalFiles.CssScope =
[/home/valentin/Документы/work/c\#7/esdp/less5/Test/StudyBlog/Views/Errors/NotFound.cshtml]
build_metadata.AdditionalFiles.TargetPath = Vmlld3MvRXJyb3JzL05vdEZvdW5kLmNzaHRtbA==
build_metadata.AdditionalFiles.CssScope =
[/home/valentin/Документы/work/c\#7/esdp/less5/Test/StudyBlog/Views/Posts/Create.cshtml]
build_metadata.AdditionalFiles.TargetPath = Vmlld3MvUG9zdHMvQ3JlYXRlLmNzaHRtbA==
build_metadata.AdditionalFiles.CssScope =
[/home/valentin/Документы/work/c\#7/esdp/less5/Test/StudyBlog/Views/Posts/Edit.cshtml]
build_metadata.AdditionalFiles.TargetPath = Vmlld3MvUG9zdHMvRWRpdC5jc2h0bWw=
build_metadata.AdditionalFiles.CssScope =
[/home/valentin/Документы/work/c\#7/esdp/less5/Test/StudyBlog/Views/Posts/Index.cshtml]
build_metadata.AdditionalFiles.TargetPath = Vmlld3MvUG9zdHMvSW5kZXguY3NodG1s
build_metadata.AdditionalFiles.CssScope =
[/home/valentin/Документы/work/c\#7/esdp/less5/Test/StudyBlog/Views/Posts/Post.cshtml]
build_metadata.AdditionalFiles.TargetPath = Vmlld3MvUG9zdHMvUG9zdC5jc2h0bWw=
build_metadata.AdditionalFiles.CssScope =
[/home/valentin/Документы/work/c\#7/esdp/less5/Test/StudyBlog/Views/Shared/Error.cshtml]
build_metadata.AdditionalFiles.TargetPath = Vmlld3MvU2hhcmVkL0Vycm9yLmNzaHRtbA==
build_metadata.AdditionalFiles.CssScope =
[/home/valentin/Документы/work/c\#7/esdp/less5/Test/StudyBlog/Views/Shared/PartialViews/PostPartialView.cshtml]
build_metadata.AdditionalFiles.TargetPath = Vmlld3MvU2hhcmVkL1BhcnRpYWxWaWV3cy9Qb3N0UGFydGlhbFZpZXcuY3NodG1s
build_metadata.AdditionalFiles.CssScope =
[/home/valentin/Документы/work/c\#7/esdp/less5/Test/StudyBlog/Views/Shared/_Layout.cshtml]
build_metadata.AdditionalFiles.TargetPath = Vmlld3MvU2hhcmVkL19MYXlvdXQuY3NodG1s
build_metadata.AdditionalFiles.CssScope =
[/home/valentin/Документы/work/c\#7/esdp/less5/Test/StudyBlog/Views/Shared/_ValidationScriptsPartial.cshtml]
build_metadata.AdditionalFiles.TargetPath = Vmlld3MvU2hhcmVkL19WYWxpZGF0aW9uU2NyaXB0c1BhcnRpYWwuY3NodG1s
build_metadata.AdditionalFiles.CssScope =
[/home/valentin/Документы/work/c\#7/esdp/less5/Test/StudyBlog/Views/Users/Index.cshtml]
build_metadata.AdditionalFiles.TargetPath = Vmlld3MvVXNlcnMvSW5kZXguY3NodG1s
build_metadata.AdditionalFiles.CssScope =
[/home/valentin/Документы/work/c\#7/esdp/less5/Test/StudyBlog/Views/_ViewImports.cshtml]
build_metadata.AdditionalFiles.TargetPath = Vmlld3MvX1ZpZXdJbXBvcnRzLmNzaHRtbA==
build_metadata.AdditionalFiles.CssScope =
[/home/valentin/Документы/work/c\#7/esdp/less5/Test/StudyBlog/Views/_ViewStart.cshtml]
build_metadata.AdditionalFiles.TargetPath = Vmlld3MvX1ZpZXdTdGFydC5jc2h0bWw=
build_metadata.AdditionalFiles.CssScope =
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: Microsoft.AspNetCore.Mvc.ApplicationParts.ProvideApplicationPartFactoryAttribute("Microsoft.AspNetCore.Mvc.ApplicationParts.ConsolidatedAssemblyApplicationPartFact" +
"ory, Microsoft.AspNetCore.Mvc.Razor")]
// Создано классом WriteCodeFragment MSBuild.
/home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog/bin/Debug/net6.0/appsettings.Development.json
/home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog/bin/Debug/net6.0/appsettings.json
/home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog/bin/Debug/net6.0/StudyBlog.staticwebassets.runtime.json
/home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog/bin/Debug/net6.0/StudyBlog
/home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog/bin/Debug/net6.0/StudyBlog.deps.json
/home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog/bin/Debug/net6.0/StudyBlog.runtimeconfig.json
/home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog/bin/Debug/net6.0/StudyBlog.dll
/home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog/bin/Debug/net6.0/StudyBlog.pdb
/home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog/bin/Debug/net6.0/Castle.Core.dll
/home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog/bin/Debug/net6.0/Humanizer.dll
/home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog/bin/Debug/net6.0/Microsoft.AspNetCore.Cryptography.Internal.dll
/home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog/bin/Debug/net6.0/Microsoft.AspNetCore.Cryptography.KeyDerivation.dll
/home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog/bin/Debug/net6.0/Microsoft.AspNetCore.Identity.EntityFrameworkCore.dll
/home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog/bin/Debug/net6.0/Microsoft.EntityFrameworkCore.dll
/home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog/bin/Debug/net6.0/Microsoft.EntityFrameworkCore.Abstractions.dll
/home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog/bin/Debug/net6.0/Microsoft.EntityFrameworkCore.Design.dll
/home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog/bin/Debug/net6.0/Microsoft.EntityFrameworkCore.Proxies.dll
/home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog/bin/Debug/net6.0/Microsoft.EntityFrameworkCore.Relational.dll
/home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog/bin/Debug/net6.0/Microsoft.Extensions.Caching.Memory.dll
/home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog/bin/Debug/net6.0/Microsoft.Extensions.Identity.Core.dll
/home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog/bin/Debug/net6.0/Microsoft.Extensions.Identity.Stores.dll
/home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog/bin/Debug/net6.0/Npgsql.dll
/home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog/bin/Debug/net6.0/Npgsql.EntityFrameworkCore.PostgreSQL.dll
/home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog/obj/Debug/net6.0/StudyBlog.csproj.AssemblyReference.cache
/home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog/obj/Debug/net6.0/StudyBlog.GeneratedMSBuildEditorConfig.editorconfig
/home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog/obj/Debug/net6.0/StudyBlog.AssemblyInfoInputs.cache
/home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog/obj/Debug/net6.0/StudyBlog.AssemblyInfo.cs
/home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog/obj/Debug/net6.0/StudyBlog.csproj.CoreCompileInputs.cache
/home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog/obj/Debug/net6.0/StudyBlog.MvcApplicationPartsAssemblyInfo.cache
/home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog/obj/Debug/net6.0/StudyBlog.RazorAssemblyInfo.cache
/home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog/obj/Debug/net6.0/StudyBlog.RazorAssemblyInfo.cs
/home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog/obj/Debug/net6.0/staticwebassets.build.json
/home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog/obj/Debug/net6.0/staticwebassets.development.json
/home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog/obj/Debug/net6.0/scopedcss/bundle/StudyBlog.styles.css
/home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog/obj/Debug/net6.0/StudyBlog.csproj.CopyComplete
/home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog/obj/Debug/net6.0/StudyBlog.dll
/home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog/obj/Debug/net6.0/refint/StudyBlog.dll
/home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog/obj/Debug/net6.0/StudyBlog.pdb
/home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog/obj/Debug/net6.0/StudyBlog.genruntimeconfig.cache
/home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog/obj/Debug/net6.0/ref/StudyBlog.dll
This diff is collapsed.
{"ContentRoots":["/home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog/wwwroot/"],"Root":{"Children":{"css":{"Children":{"site.css":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"css/site.css"},"Patterns":null}},"Asset":null,"Patterns":null},"favicon.ico":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"favicon.ico"},"Patterns":null},"images":{"Children":{"Cat.jpg":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"images/Cat.jpg"},"Patterns":null},"IMG_4054.jpg":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"images/IMG_4054.jpg"},"Patterns":null},"userPosts":{"Children":{"boyarsky.jpg":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"images/userPosts/boyarsky.jpg"},"Patterns":null}},"Asset":null,"Patterns":null}},"Asset":null,"Patterns":null},"js":{"Children":{"site.js":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"js/site.js"},"Patterns":null}},"Asset":null,"Patterns":null},"lib":{"Children":{"bootstrap":{"Children":{"dist":{"Children":{"css":{"Children":{"bootstrap-grid.css":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/bootstrap/dist/css/bootstrap-grid.css"},"Patterns":null},"bootstrap-grid.css.map":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/bootstrap/dist/css/bootstrap-grid.css.map"},"Patterns":null},"bootstrap-grid.min.css":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/bootstrap/dist/css/bootstrap-grid.min.css"},"Patterns":null},"bootstrap-grid.min.css.map":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/bootstrap/dist/css/bootstrap-grid.min.css.map"},"Patterns":null},"bootstrap-reboot.css":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/bootstrap/dist/css/bootstrap-reboot.css"},"Patterns":null},"bootstrap-reboot.css.map":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/bootstrap/dist/css/bootstrap-reboot.css.map"},"Patterns":null},"bootstrap-reboot.min.css":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/bootstrap/dist/css/bootstrap-reboot.min.css"},"Patterns":null},"bootstrap-reboot.min.css.map":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/bootstrap/dist/css/bootstrap-reboot.min.css.map"},"Patterns":null},"bootstrap.css":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/bootstrap/dist/css/bootstrap.css"},"Patterns":null},"bootstrap.css.map":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/bootstrap/dist/css/bootstrap.css.map"},"Patterns":null},"bootstrap.min.css":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/bootstrap/dist/css/bootstrap.min.css"},"Patterns":null},"bootstrap.min.css.map":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/bootstrap/dist/css/bootstrap.min.css.map"},"Patterns":null}},"Asset":null,"Patterns":null},"js":{"Children":{"bootstrap.bundle.js":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/bootstrap/dist/js/bootstrap.bundle.js"},"Patterns":null},"bootstrap.bundle.js.map":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/bootstrap/dist/js/bootstrap.bundle.js.map"},"Patterns":null},"bootstrap.bundle.min.js":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/bootstrap/dist/js/bootstrap.bundle.min.js"},"Patterns":null},"bootstrap.bundle.min.js.map":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/bootstrap/dist/js/bootstrap.bundle.min.js.map"},"Patterns":null},"bootstrap.js":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/bootstrap/dist/js/bootstrap.js"},"Patterns":null},"bootstrap.js.map":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/bootstrap/dist/js/bootstrap.js.map"},"Patterns":null},"bootstrap.min.js":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/bootstrap/dist/js/bootstrap.min.js"},"Patterns":null},"bootstrap.min.js.map":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/bootstrap/dist/js/bootstrap.min.js.map"},"Patterns":null}},"Asset":null,"Patterns":null}},"Asset":null,"Patterns":null},"LICENSE":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/bootstrap/LICENSE"},"Patterns":null}},"Asset":null,"Patterns":null},"jquery-validation-unobtrusive":{"Children":{"jquery.validate.unobtrusive.js":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js"},"Patterns":null},"jquery.validate.unobtrusive.min.js":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js"},"Patterns":null},"LICENSE.txt":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/jquery-validation-unobtrusive/LICENSE.txt"},"Patterns":null}},"Asset":null,"Patterns":null},"jquery-validation":{"Children":{"dist":{"Children":{"additional-methods.js":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/jquery-validation/dist/additional-methods.js"},"Patterns":null},"additional-methods.min.js":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/jquery-validation/dist/additional-methods.min.js"},"Patterns":null},"jquery.validate.js":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/jquery-validation/dist/jquery.validate.js"},"Patterns":null},"jquery.validate.min.js":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/jquery-validation/dist/jquery.validate.min.js"},"Patterns":null}},"Asset":null,"Patterns":null},"LICENSE.md":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/jquery-validation/LICENSE.md"},"Patterns":null}},"Asset":null,"Patterns":null},"jquery":{"Children":{"dist":{"Children":{"jquery.js":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/jquery/dist/jquery.js"},"Patterns":null},"jquery.min.js":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/jquery/dist/jquery.min.js"},"Patterns":null},"jquery.min.map":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/jquery/dist/jquery.min.map"},"Patterns":null}},"Asset":null,"Patterns":null},"LICENSE.txt":{"Children":null,"Asset":{"ContentRootIndex":0,"SubPath":"lib/jquery/LICENSE.txt"},"Patterns":null}},"Asset":null,"Patterns":null}},"Asset":null,"Patterns":null}},"Asset":null,"Patterns":[{"ContentRootIndex":0,"Pattern":"**","Depth":0}]}}
\ No newline at end of file
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v3.1", FrameworkDisplayName = "")]
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("StudyBlog")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("StudyBlog")]
[assembly: System.Reflection.AssemblyTitleAttribute("StudyBlog")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// Создано классом WriteCodeFragment MSBuild.
is_global = true
build_property.RootNamespace = StudyBlog
build_property.ProjectDir = /home/valentin/Документы/work/c#7/esdp/less5/Test/StudyBlog/
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: Microsoft.AspNetCore.Mvc.ApplicationParts.RelatedAssemblyAttribute("StudyBlog.Views")]
// Создано классом WriteCodeFragment MSBuild.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment