Frontend design completed
This commit is contained in:
parent
366f0c7bef
commit
2ebe7ad5b3
49 changed files with 11750 additions and 12954 deletions
|
|
@ -70,6 +70,18 @@ namespace Data
|
||||||
.HasKey(a => a.Id);
|
.HasKey(a => a.Id);
|
||||||
|
|
||||||
|
|
||||||
|
//modelBuilder.Entity<Page>()
|
||||||
|
// .HasOne(p => p.footer)
|
||||||
|
// .WithMany()
|
||||||
|
// .HasForeignKey(p => p.FooterId)
|
||||||
|
// .IsRequired(false)
|
||||||
|
// .OnDelete(DeleteBehavior.Cascade);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
base.OnModelCreating(modelBuilder);
|
base.OnModelCreating(modelBuilder);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,11 @@ namespace Model
|
||||||
public string? Content { get; set; }
|
public string? Content { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public int FooterId { get; set; }
|
||||||
|
|
||||||
|
[ForeignKey("FooterId")]
|
||||||
|
public Footer? footer { get; set; }
|
||||||
|
|
||||||
public int BannerId { get; set; }
|
public int BannerId { get; set; }
|
||||||
|
|
||||||
[ForeignKey("BannerId")]
|
[ForeignKey("BannerId")]
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,11 @@ namespace Services.Implemnetation
|
||||||
return _context.Addresss.ToList();
|
return _context.Addresss.ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<List<Address>> GetAddressesAsync()
|
||||||
|
{
|
||||||
|
return await _context.Addresss.AsNoTracking().ToListAsync();
|
||||||
|
}
|
||||||
|
|
||||||
public void Update(Address address)
|
public void Update(Address address)
|
||||||
{
|
{
|
||||||
_context.Addresss.Update(address);
|
_context.Addresss.Update(address);
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,11 @@ namespace Services.Implemnetation
|
||||||
return _context.Banners.AsNoTracking().Where(x => x.Id == id).FirstOrDefault();
|
return _context.Banners.AsNoTracking().Where(x => x.Id == id).FirstOrDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<Banner> GetBannerByIdAsync(int id)
|
||||||
|
{
|
||||||
|
return await _context.Banners.AsNoTracking().Where(x => x.Id == id).FirstOrDefaultAsync();
|
||||||
|
}
|
||||||
|
|
||||||
public async Task<IEnumerable<Banner>> GetBanners()
|
public async Task<IEnumerable<Banner>> GetBanners()
|
||||||
{
|
{
|
||||||
return await _context.Banners.AsNoTracking().ToListAsync();
|
return await _context.Banners.AsNoTracking().ToListAsync();
|
||||||
|
|
|
||||||
|
|
@ -45,11 +45,23 @@ namespace Services.Implemnetation
|
||||||
return _context.Pages.Where(x => x.Slug == slug).AsNoTracking().FirstOrDefault();
|
return _context.Pages.Where(x => x.Slug == slug).AsNoTracking().FirstOrDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<Page> GetPageWithAll()
|
||||||
|
{
|
||||||
|
|
||||||
|
return _context.Pages.Include(x => x.banner).Include(x => x.footer).AsNoTracking().ToList();
|
||||||
|
}
|
||||||
|
|
||||||
public List<Page> GetPageWithBanner()
|
public List<Page> GetPageWithBanner()
|
||||||
{
|
{
|
||||||
return _context.Pages.Include(x => x.banner).AsNoTracking().ToList();
|
return _context.Pages.Include(x => x.banner).AsNoTracking().ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<Page> GetPageWithFooter()
|
||||||
|
{
|
||||||
|
|
||||||
|
return _context.Pages.Include(x => x.footer).AsNoTracking().ToList();
|
||||||
|
}
|
||||||
|
|
||||||
public bool SlugExists(string slug, int? pageIdExclude = null)
|
public bool SlugExists(string slug, int? pageIdExclude = null)
|
||||||
{
|
{
|
||||||
if (pageIdExclude != null)
|
if (pageIdExclude != null)
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,8 @@ namespace Services.Interaces
|
||||||
|
|
||||||
List<Address> GetAddresses();
|
List<Address> GetAddresses();
|
||||||
|
|
||||||
|
Task<List<Address>> GetAddressesAsync();
|
||||||
|
|
||||||
Address GetAddressById(int? id);
|
Address GetAddressById(int? id);
|
||||||
|
|
||||||
Task Add(Address address);
|
Task Add(Address address);
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ namespace Services.Interaces
|
||||||
List<Banner> GetAllBanners();
|
List<Banner> GetAllBanners();
|
||||||
|
|
||||||
Banner GetBannerById(int id);
|
Banner GetBannerById(int id);
|
||||||
|
Task<Banner> GetBannerByIdAsync(int id);
|
||||||
|
|
||||||
Task Add(Banner banner);
|
Task Add(Banner banner);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,11 @@ namespace Services.Interaces
|
||||||
|
|
||||||
void Update(Page page);
|
void Update(Page page);
|
||||||
|
|
||||||
|
List<Page> GetPageWithAll();
|
||||||
|
|
||||||
List<Page> GetPageWithBanner();
|
List<Page> GetPageWithBanner();
|
||||||
|
List<Page> GetPageWithFooter();
|
||||||
|
|
||||||
|
|
||||||
Page GetPageSlug(string slug);
|
Page GetPageSlug(string slug);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,21 +11,24 @@ namespace Web.Areas.Admin.Controllers
|
||||||
{
|
{
|
||||||
private readonly IPageRepository _pageRepository;
|
private readonly IPageRepository _pageRepository;
|
||||||
private readonly IBannerRepository _bannerRepository;
|
private readonly IBannerRepository _bannerRepository;
|
||||||
|
private readonly IFooterRepository _footerRepository;
|
||||||
|
|
||||||
public PageController(IPageRepository pageRepository,IBannerRepository bannerRepository)
|
public PageController(IPageRepository pageRepository,IBannerRepository bannerRepository, IFooterRepository footerRepository)
|
||||||
{
|
{
|
||||||
_pageRepository = pageRepository;
|
_pageRepository = pageRepository;
|
||||||
_bannerRepository = bannerRepository;
|
_bannerRepository = bannerRepository;
|
||||||
|
_footerRepository = footerRepository;
|
||||||
}
|
}
|
||||||
public IActionResult Index()
|
public IActionResult Index()
|
||||||
{
|
{
|
||||||
var pages = _pageRepository.GetPageWithBanner();
|
var pages = _pageRepository.GetPageWithAll();
|
||||||
|
|
||||||
|
|
||||||
List<PageViewModel> result = new List<PageViewModel>();
|
List<PageViewModel> result = new List<PageViewModel>();
|
||||||
|
|
||||||
foreach (var page in pages)
|
foreach (var page in pages)
|
||||||
{
|
{
|
||||||
result.Add(new PageViewModel { Id = page.Id, Title = page.Title, Slug = page.Slug, banner = page.banner });
|
result.Add(new PageViewModel { Id = page.Id, Title = page.Title, Slug = page.Slug, banner = page.banner,Footer=page.footer });
|
||||||
}
|
}
|
||||||
|
|
||||||
return View(result);
|
return View(result);
|
||||||
|
|
@ -35,6 +38,7 @@ namespace Web.Areas.Admin.Controllers
|
||||||
public IActionResult Create()
|
public IActionResult Create()
|
||||||
{
|
{
|
||||||
ViewBag.DropDownData=GetSidebarsForDropDownList();
|
ViewBag.DropDownData=GetSidebarsForDropDownList();
|
||||||
|
ViewBag.FooterDropDown = GetFooterForDropDownList();
|
||||||
|
|
||||||
return View();
|
return View();
|
||||||
}
|
}
|
||||||
|
|
@ -48,6 +52,7 @@ namespace Web.Areas.Admin.Controllers
|
||||||
if(!ModelState.IsValid)
|
if(!ModelState.IsValid)
|
||||||
{
|
{
|
||||||
ViewBag.DropDownData = GetSidebarsForDropDownList();
|
ViewBag.DropDownData = GetSidebarsForDropDownList();
|
||||||
|
ViewBag.FooterDropDown = GetFooterForDropDownList();
|
||||||
return View(viewmodel);
|
return View(viewmodel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -64,6 +69,7 @@ namespace Web.Areas.Admin.Controllers
|
||||||
{
|
{
|
||||||
ModelState.AddModelError("", "Title or slug exists");
|
ModelState.AddModelError("", "Title or slug exists");
|
||||||
ViewBag.DropDownData = GetSidebarsForDropDownList();
|
ViewBag.DropDownData = GetSidebarsForDropDownList();
|
||||||
|
ViewBag.FooterDropDown = GetFooterForDropDownList();
|
||||||
return View(viewmodel);
|
return View(viewmodel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -74,6 +80,8 @@ namespace Web.Areas.Admin.Controllers
|
||||||
page.Content = viewmodel.Content;
|
page.Content = viewmodel.Content;
|
||||||
page.banner = viewmodel.banner;
|
page.banner = viewmodel.banner;
|
||||||
page.BannerId = viewmodel.BannerId;
|
page.BannerId = viewmodel.BannerId;
|
||||||
|
page.footer = viewmodel.Footer;
|
||||||
|
page.FooterId = viewmodel.FooterId;
|
||||||
|
|
||||||
|
|
||||||
_pageRepository.Add(page);
|
_pageRepository.Add(page);
|
||||||
|
|
@ -96,10 +104,12 @@ namespace Web.Areas.Admin.Controllers
|
||||||
Content=pageFromdb.Content,
|
Content=pageFromdb.Content,
|
||||||
banner=pageFromdb.banner,
|
banner=pageFromdb.banner,
|
||||||
BannerId=pageFromdb.BannerId,
|
BannerId=pageFromdb.BannerId,
|
||||||
|
Footer = pageFromdb.footer,
|
||||||
|
FooterId = pageFromdb.FooterId,
|
||||||
|
|
||||||
};
|
};
|
||||||
ViewBag.DropDownData = GetSidebarsForDropDownList();
|
ViewBag.DropDownData = GetSidebarsForDropDownList();
|
||||||
|
ViewBag.FooterDropDown = GetFooterForDropDownList();
|
||||||
|
|
||||||
|
|
||||||
return View(viewmodel);
|
return View(viewmodel);
|
||||||
|
|
@ -112,6 +122,7 @@ namespace Web.Areas.Admin.Controllers
|
||||||
{
|
{
|
||||||
|
|
||||||
ViewBag.DropDownData = GetSidebarsForDropDownList();
|
ViewBag.DropDownData = GetSidebarsForDropDownList();
|
||||||
|
ViewBag.FooterDropDown = GetFooterForDropDownList();
|
||||||
return View(viewmodel);
|
return View(viewmodel);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -128,6 +139,7 @@ namespace Web.Areas.Admin.Controllers
|
||||||
|
|
||||||
ModelState.AddModelError("", "Title or slug exists");
|
ModelState.AddModelError("", "Title or slug exists");
|
||||||
ViewBag.DropDownData = GetSidebarsForDropDownList();
|
ViewBag.DropDownData = GetSidebarsForDropDownList();
|
||||||
|
ViewBag.FooterDropDown = GetFooterForDropDownList();
|
||||||
return View(viewmodel);
|
return View(viewmodel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -138,6 +150,8 @@ namespace Web.Areas.Admin.Controllers
|
||||||
page.Content = viewmodel.Content;
|
page.Content = viewmodel.Content;
|
||||||
page.banner = viewmodel.banner;
|
page.banner = viewmodel.banner;
|
||||||
page.BannerId = viewmodel.BannerId;
|
page.BannerId = viewmodel.BannerId;
|
||||||
|
page.footer = viewmodel.Footer;
|
||||||
|
page.FooterId = viewmodel.FooterId;
|
||||||
|
|
||||||
|
|
||||||
_pageRepository.Update(page);
|
_pageRepository.Update(page);
|
||||||
|
|
@ -165,10 +179,13 @@ namespace Web.Areas.Admin.Controllers
|
||||||
Content = pageFromdb.Content,
|
Content = pageFromdb.Content,
|
||||||
banner = pageFromdb.banner,
|
banner = pageFromdb.banner,
|
||||||
BannerId = pageFromdb.BannerId,
|
BannerId = pageFromdb.BannerId,
|
||||||
|
Footer = pageFromdb.footer,
|
||||||
|
FooterId = pageFromdb.FooterId,
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
ViewBag.DropDownData = GetSidebarsForDropDownList();
|
ViewBag.DropDownData = GetSidebarsForDropDownList();
|
||||||
|
ViewBag.FooterDropDown = GetFooterForDropDownList();
|
||||||
|
|
||||||
|
|
||||||
return View(viewmodel);
|
return View(viewmodel);
|
||||||
|
|
@ -202,6 +219,20 @@ namespace Web.Areas.Admin.Controllers
|
||||||
return dropDown;
|
return dropDown;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private List<SelectListItem> GetFooterForDropDownList()
|
||||||
|
{
|
||||||
|
var banners = _footerRepository.GetFooter();
|
||||||
|
|
||||||
|
List<SelectListItem> dropDown = new List<SelectListItem>();
|
||||||
|
|
||||||
|
foreach (var item in banners)
|
||||||
|
{
|
||||||
|
dropDown.Add(new SelectListItem { Text = item.Title, Value = item.Id.ToString() });
|
||||||
|
}
|
||||||
|
|
||||||
|
return dropDown;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,11 @@
|
||||||
<select asp-for="BannerId" asp-items="ViewBag.DropDownData" class="form-control"></select>
|
<select asp-for="BannerId" asp-items="ViewBag.DropDownData" class="form-control"></select>
|
||||||
<span asp-validation-for="BannerId" class="text-danger"></span>
|
<span asp-validation-for="BannerId" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="mb-3 col-12">
|
||||||
|
<label asp-for="FooterId" class="control-label"></label>
|
||||||
|
<select asp-for="FooterId" asp-items=" ViewBag.FooterDropDown" class="form-control"></select>
|
||||||
|
<span asp-validation-for="FooterId" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<input type="submit" value="Create" class="btn btn-outline-primary" /> | <a asp-action="Index" class="btn btn-primary">Back to list</a>
|
<input type="submit" value="Create" class="btn btn-outline-primary" /> | <a asp-action="Index" class="btn btn-primary">Back to list</a>
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,12 @@
|
||||||
<select asp-for="BannerId" asp-items="ViewBag.DropDownData" class="form-control" disabled></select>
|
<select asp-for="BannerId" asp-items="ViewBag.DropDownData" class="form-control" disabled></select>
|
||||||
<span asp-validation-for="BannerId" class="text-danger"></span>
|
<span asp-validation-for="BannerId" class="text-danger"></span>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="mb-3 col-12">
|
||||||
|
<label asp-for="FooterId" class="control-label"></label>
|
||||||
|
<select asp-for="FooterId" asp-items="ViewBag.DropDownData" class="form-control" disabled></select>
|
||||||
|
<span asp-validation-for="FooterId" class="text-danger"></span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,11 @@
|
||||||
<select asp-for="BannerId" asp-items="ViewBag.DropDownData" class="form-control"></select>
|
<select asp-for="BannerId" asp-items="ViewBag.DropDownData" class="form-control"></select>
|
||||||
<span asp-validation-for="BannerId" class="text-danger"></span>
|
<span asp-validation-for="BannerId" class="text-danger"></span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="mb-3 col-12">
|
||||||
|
<label asp-for="FooterId" class="control-label"></label>
|
||||||
|
<select asp-for="FooterId" asp-items=" ViewBag.FooterDropDown" class="form-control"></select>
|
||||||
|
<span asp-validation-for="FooterId" class="text-danger"></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<input type="submit" value="Update" class="btn btn-outline-primary" /> | <a asp-action="Index" class="btn btn-primary">Back to list</a>
|
<input type="submit" value="Update" class="btn btn-outline-primary" /> | <a asp-action="Index" class="btn btn-primary">Back to list</a>
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@
|
||||||
<th scope="col">Title</th>
|
<th scope="col">Title</th>
|
||||||
<th scope="col">Slug</th>
|
<th scope="col">Slug</th>
|
||||||
<th scope="col">Banner</th>
|
<th scope="col">Banner</th>
|
||||||
|
<th scope="col">Footer</th>
|
||||||
<th scope="col" class="d-flex justify-content-end">Action</th>
|
<th scope="col" class="d-flex justify-content-end">Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
@ -39,6 +40,7 @@
|
||||||
<td> <span class="badge bg-primary">@item.Title</span></td>
|
<td> <span class="badge bg-primary">@item.Title</span></td>
|
||||||
<td>@item.Slug</td>
|
<td>@item.Slug</td>
|
||||||
<td>@item.banner?.Title</td>
|
<td>@item.banner?.Title</td>
|
||||||
|
<td>@item.Footer?.Title</td>
|
||||||
<td class="d-flex justify-content-end">
|
<td class="d-flex justify-content-end">
|
||||||
<a asp-action="Delete" asp-route-id="@item.Id" class="btn btn-danger btn-s"><i class="bi bi-trash"></i> Delete</a> |
|
<a asp-action="Delete" asp-route-id="@item.Id" class="btn btn-danger btn-s"><i class="bi bi-trash"></i> Delete</a> |
|
||||||
<a asp-action="Edit" asp-route-id="@item.Id" class="btn btn-warning btn-s"><i class="bi bi-pencil-square"></i> Edit</a>
|
<a asp-action="Edit" asp-route-id="@item.Id" class="btn btn-warning btn-s"><i class="bi bi-pencil-square"></i> Edit</a>
|
||||||
|
|
|
||||||
|
|
@ -10,11 +10,13 @@
|
||||||
@* <h6 class="text-danger">Are you sure you want to delete this questionnaire: <span class="badge bg-danger p-2 shadow rounded">@Model.Title</span></h6> *@
|
@* <h6 class="text-danger">Are you sure you want to delete this questionnaire: <span class="badge bg-danger p-2 shadow rounded">@Model.Title</span></h6> *@
|
||||||
<h6 class="text-danger">
|
<h6 class="text-danger">
|
||||||
Are you sure you want to delete:
|
Are you sure you want to delete:
|
||||||
|
|
||||||
<span class="badge bg-danger p-2 shadow rounded">
|
<span class="badge bg-danger p-2 shadow rounded">
|
||||||
<span class="item-title ">@Html.Raw(Model.Title.Length >= 30 ? Model.Title.Substring(0, 30) : Model.Title)</span>
|
<span class="item-title ">@Html.Raw(Model.Title.Length >= 30 ? Model.Title.Substring(0, 30) : Model.Title)</span>
|
||||||
<span class="more-title " style="display:none;">@(Model.Title.Length > 30 ? Model.Title.Substring(20) : "")</span>
|
<span class="more-title " style="display:none;">@(Model.Title.Length > 30 ? Model.Title.Substring(30) : "")</span>
|
||||||
</span>
|
</span>
|
||||||
<button id="readMoreBtn" type="button" class="btn btn-link">Read More</button>
|
<button type="button" class="btn btn-link readMoreBtn">Read More</button>
|
||||||
|
|
||||||
</h6>
|
</h6>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -152,19 +154,24 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$("#readMoreBtn").click(function () {
|
$(".readMoreBtn").click(function () {
|
||||||
$("#readMore").toggle();
|
$(this).closest('.text-danger').find('.more-title').toggle();
|
||||||
$(this).text(function (_, text) {
|
$(this).text(function (_, text) {
|
||||||
return text === "Read More" ? "Read Less" : "Read More";
|
return text === "Read More" ? "Read Less" : "Read More";
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Services.Interaces;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using Web.Models;
|
using Web.Models;
|
||||||
|
|
||||||
|
|
@ -6,27 +7,36 @@ namespace Web.Controllers
|
||||||
{
|
{
|
||||||
public class HomeController : Controller
|
public class HomeController : Controller
|
||||||
{
|
{
|
||||||
private readonly ILogger<HomeController> _logger;
|
private readonly IPageRepository _pageRepository;
|
||||||
|
|
||||||
public HomeController(ILogger<HomeController> logger)
|
public HomeController(IPageRepository pageRepository)
|
||||||
{
|
{
|
||||||
_logger = logger;
|
_pageRepository = pageRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IActionResult Index()
|
public IActionResult Index(string slug)
|
||||||
{
|
{
|
||||||
return View();
|
if (string.IsNullOrEmpty(slug))
|
||||||
|
slug = "home";
|
||||||
|
|
||||||
|
if (!_pageRepository.SlugExists(slug))
|
||||||
|
return RedirectToAction(nameof(Error));
|
||||||
|
|
||||||
|
var pageFromdb = _pageRepository.GetPageSlug(slug);
|
||||||
|
|
||||||
|
TempData["bannerId"] = pageFromdb.BannerId;
|
||||||
|
TempData["Footer"] = pageFromdb.FooterId;
|
||||||
|
|
||||||
|
|
||||||
|
return View(pageFromdb);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IActionResult Privacy()
|
|
||||||
{
|
|
||||||
return View();
|
|
||||||
}
|
|
||||||
|
|
||||||
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
|
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
|
||||||
public IActionResult Error()
|
public IActionResult Error()
|
||||||
{
|
{
|
||||||
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
|
return View();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,8 @@ namespace Web.Extesions
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static void ConfigurePageServices(this IServiceCollection services)
|
public static void ConfigurePageServices(this IServiceCollection services)
|
||||||
{
|
{
|
||||||
services.AddScoped<IPageRepository,PageRepository>();
|
services.AddScoped<IPageRepository,PageRepository>();
|
||||||
|
|
|
||||||
259
Web/Migrations/20240228172237_Initial.Designer.cs
generated
259
Web/Migrations/20240228172237_Initial.Designer.cs
generated
|
|
@ -1,259 +0,0 @@
|
||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using Data;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Metadata;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Web.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(SurveyContext))]
|
|
||||||
[Migration("20240228172237_Initial")]
|
|
||||||
partial class Initial
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder
|
|
||||||
.HasAnnotation("ProductVersion", "8.0.2")
|
|
||||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
|
||||||
|
|
||||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Address", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("CVR")
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("City")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Country")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Email")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Mobile")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("PostalCode")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("State")
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Street")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Addresss");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Banner", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("Content")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("ImageUrl")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("LinkUrl")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Banners");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Footer", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("Content")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("CreatedBy")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("ImageUlr")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<DateTime>("LastUpdated")
|
|
||||||
.HasColumnType("datetime2");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Owner")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Sitecopyright")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("UpdatedBy")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Footers");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.FooterSocialMedia", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("FooterId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<int>("SocialId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.HasKey("FooterId", "SocialId");
|
|
||||||
|
|
||||||
b.HasIndex("SocialId");
|
|
||||||
|
|
||||||
b.ToTable("FooterSocialMedias");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Page", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<int>("BannerId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<string>("Content")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Slug")
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("BannerId");
|
|
||||||
|
|
||||||
b.ToTable("Pages");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.SocialMedia", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Url")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("SocialMedia");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.FooterSocialMedia", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("Model.Footer", "Footer")
|
|
||||||
.WithMany("FooterSocialMedias")
|
|
||||||
.HasForeignKey("FooterId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("Model.SocialMedia", "SocialMedia")
|
|
||||||
.WithMany("FooterSocialMedias")
|
|
||||||
.HasForeignKey("SocialId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Footer");
|
|
||||||
|
|
||||||
b.Navigation("SocialMedia");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Page", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("Model.Banner", "banner")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("BannerId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("banner");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Footer", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("FooterSocialMedias");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.SocialMedia", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("FooterSocialMedias");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,371 +0,0 @@
|
||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using Data;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Metadata;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Web.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(SurveyContext))]
|
|
||||||
[Migration("20240307153635_SurveyModelsAdded")]
|
|
||||||
partial class SurveyModelsAdded
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder
|
|
||||||
.HasAnnotation("ProductVersion", "8.0.2")
|
|
||||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
|
||||||
|
|
||||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Address", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("CVR")
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("City")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Country")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Email")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Mobile")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("PostalCode")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("State")
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Street")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Addresss");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Answer", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<int>("QuestionId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<string>("Text")
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("QuestionId");
|
|
||||||
|
|
||||||
b.ToTable("Answers");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Banner", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("Content")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("ImageUrl")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("LinkUrl")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Banners");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Footer", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("Content")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("CreatedBy")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("ImageUlr")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<DateTime>("LastUpdated")
|
|
||||||
.HasColumnType("datetime2");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Owner")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Sitecopyright")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("UpdatedBy")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Footers");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.FooterSocialMedia", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("FooterId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<int>("SocialId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.HasKey("FooterId", "SocialId");
|
|
||||||
|
|
||||||
b.HasIndex("SocialId");
|
|
||||||
|
|
||||||
b.ToTable("FooterSocialMedias");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Page", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<int>("BannerId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<string>("Content")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Slug")
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("BannerId");
|
|
||||||
|
|
||||||
b.ToTable("Pages");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Question", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<int>("QuestionnaireId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<string>("Text")
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<int>("Type")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("QuestionnaireId");
|
|
||||||
|
|
||||||
b.ToTable("Questions");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.QuestionTypeEntities", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<int>("Type")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("QuestionTypeEntities");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Questionnaire", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Questionnaires");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.SocialMedia", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Url")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("SocialMedia");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Answer", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("Model.Question", "Question")
|
|
||||||
.WithMany("Answers")
|
|
||||||
.HasForeignKey("QuestionId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Question");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.FooterSocialMedia", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("Model.Footer", "Footer")
|
|
||||||
.WithMany("FooterSocialMedias")
|
|
||||||
.HasForeignKey("FooterId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("Model.SocialMedia", "SocialMedia")
|
|
||||||
.WithMany("FooterSocialMedias")
|
|
||||||
.HasForeignKey("SocialId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Footer");
|
|
||||||
|
|
||||||
b.Navigation("SocialMedia");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Page", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("Model.Banner", "banner")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("BannerId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("banner");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Question", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("Model.Questionnaire", "Questionnaire")
|
|
||||||
.WithMany("Questions")
|
|
||||||
.HasForeignKey("QuestionnaireId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Questionnaire");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Footer", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("FooterSocialMedias");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Question", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Answers");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Questionnaire", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Questions");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.SocialMedia", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("FooterSocialMedias");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,108 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Web.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class SurveyModelsAdded : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "Questionnaires",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<int>(type: "int", nullable: false)
|
|
||||||
.Annotation("SqlServer:Identity", "1, 1"),
|
|
||||||
Title = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
||||||
Description = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_Questionnaires", x => x.Id);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "QuestionTypeEntities",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<int>(type: "int", nullable: false)
|
|
||||||
.Annotation("SqlServer:Identity", "1, 1"),
|
|
||||||
Type = table.Column<int>(type: "int", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_QuestionTypeEntities", x => x.Id);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "Questions",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<int>(type: "int", nullable: false)
|
|
||||||
.Annotation("SqlServer:Identity", "1, 1"),
|
|
||||||
Text = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
||||||
Type = table.Column<int>(type: "int", nullable: false),
|
|
||||||
QuestionnaireId = table.Column<int>(type: "int", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_Questions", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_Questions_Questionnaires_QuestionnaireId",
|
|
||||||
column: x => x.QuestionnaireId,
|
|
||||||
principalTable: "Questionnaires",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "Answers",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<int>(type: "int", nullable: false)
|
|
||||||
.Annotation("SqlServer:Identity", "1, 1"),
|
|
||||||
Text = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|
||||||
QuestionId = table.Column<int>(type: "int", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_Answers", x => x.Id);
|
|
||||||
table.ForeignKey(
|
|
||||||
name: "FK_Answers_Questions_QuestionId",
|
|
||||||
column: x => x.QuestionId,
|
|
||||||
principalTable: "Questions",
|
|
||||||
principalColumn: "Id",
|
|
||||||
onDelete: ReferentialAction.Cascade);
|
|
||||||
});
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Answers_QuestionId",
|
|
||||||
table: "Answers",
|
|
||||||
column: "QuestionId");
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
|
||||||
name: "IX_Questions_QuestionnaireId",
|
|
||||||
table: "Questions",
|
|
||||||
column: "QuestionnaireId");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "Answers");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "QuestionTypeEntities");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "Questions");
|
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "Questionnaires");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,371 +0,0 @@
|
||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using Data;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Metadata;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Web.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(SurveyContext))]
|
|
||||||
[Migration("20240308144608_DifferntTypeofQuestionAdded")]
|
|
||||||
partial class DifferntTypeofQuestionAdded
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder
|
|
||||||
.HasAnnotation("ProductVersion", "8.0.2")
|
|
||||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
|
||||||
|
|
||||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Address", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("CVR")
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("City")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Country")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Email")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Mobile")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("PostalCode")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("State")
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Street")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Addresss");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Answer", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<int>("QuestionId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<string>("Text")
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("QuestionId");
|
|
||||||
|
|
||||||
b.ToTable("Answers");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Banner", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("Content")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("ImageUrl")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("LinkUrl")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Banners");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Footer", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("Content")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("CreatedBy")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("ImageUlr")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<DateTime>("LastUpdated")
|
|
||||||
.HasColumnType("datetime2");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Owner")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Sitecopyright")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("UpdatedBy")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Footers");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.FooterSocialMedia", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("FooterId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<int>("SocialId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.HasKey("FooterId", "SocialId");
|
|
||||||
|
|
||||||
b.HasIndex("SocialId");
|
|
||||||
|
|
||||||
b.ToTable("FooterSocialMedias");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Page", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<int>("BannerId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<string>("Content")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Slug")
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("BannerId");
|
|
||||||
|
|
||||||
b.ToTable("Pages");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Question", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<int>("QuestionnaireId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<string>("Text")
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<int>("Type")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("QuestionnaireId");
|
|
||||||
|
|
||||||
b.ToTable("Questions");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.QuestionTypeEntities", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<int>("Type")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("QuestionTypeEntities");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Questionnaire", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Questionnaires");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.SocialMedia", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Url")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("SocialMedia");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Answer", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("Model.Question", "Question")
|
|
||||||
.WithMany("Answers")
|
|
||||||
.HasForeignKey("QuestionId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Question");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.FooterSocialMedia", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("Model.Footer", "Footer")
|
|
||||||
.WithMany("FooterSocialMedias")
|
|
||||||
.HasForeignKey("FooterId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("Model.SocialMedia", "SocialMedia")
|
|
||||||
.WithMany("FooterSocialMedias")
|
|
||||||
.HasForeignKey("SocialId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Footer");
|
|
||||||
|
|
||||||
b.Navigation("SocialMedia");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Page", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("Model.Banner", "banner")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("BannerId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("banner");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Question", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("Model.Questionnaire", "Questionnaire")
|
|
||||||
.WithMany("Questions")
|
|
||||||
.HasForeignKey("QuestionnaireId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Questionnaire");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Footer", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("FooterSocialMedias");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Question", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Answers");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Questionnaire", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Questions");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.SocialMedia", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("FooterSocialMedias");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Web.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class DifferntTypeofQuestionAdded : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,355 +0,0 @@
|
||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using Data;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Metadata;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Web.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(SurveyContext))]
|
|
||||||
[Migration("20240323171512_QuestionTypeEntityRemoved")]
|
|
||||||
partial class QuestionTypeEntityRemoved
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder
|
|
||||||
.HasAnnotation("ProductVersion", "8.0.2")
|
|
||||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
|
||||||
|
|
||||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Address", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("CVR")
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("City")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Country")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Email")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Mobile")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("PostalCode")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("State")
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Street")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Addresss");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Answer", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<int>("QuestionId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<string>("Text")
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("QuestionId");
|
|
||||||
|
|
||||||
b.ToTable("Answers");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Banner", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("Content")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("ImageUrl")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("LinkUrl")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Banners");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Footer", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("Content")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("CreatedBy")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("ImageUlr")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<DateTime>("LastUpdated")
|
|
||||||
.HasColumnType("datetime2");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Owner")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Sitecopyright")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("UpdatedBy")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Footers");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.FooterSocialMedia", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("FooterId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<int>("SocialId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.HasKey("FooterId", "SocialId");
|
|
||||||
|
|
||||||
b.HasIndex("SocialId");
|
|
||||||
|
|
||||||
b.ToTable("FooterSocialMedias");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Page", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<int>("BannerId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<string>("Content")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Slug")
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("BannerId");
|
|
||||||
|
|
||||||
b.ToTable("Pages");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Question", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<int>("QuestionnaireId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<string>("Text")
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<int>("Type")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("QuestionnaireId");
|
|
||||||
|
|
||||||
b.ToTable("Questions");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Questionnaire", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Questionnaires");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.SocialMedia", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Url")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("SocialMedia");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Answer", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("Model.Question", "Question")
|
|
||||||
.WithMany("Answers")
|
|
||||||
.HasForeignKey("QuestionId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Question");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.FooterSocialMedia", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("Model.Footer", "Footer")
|
|
||||||
.WithMany("FooterSocialMedias")
|
|
||||||
.HasForeignKey("FooterId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("Model.SocialMedia", "SocialMedia")
|
|
||||||
.WithMany("FooterSocialMedias")
|
|
||||||
.HasForeignKey("SocialId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Footer");
|
|
||||||
|
|
||||||
b.Navigation("SocialMedia");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Page", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("Model.Banner", "banner")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("BannerId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("banner");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Question", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("Model.Questionnaire", "Questionnaire")
|
|
||||||
.WithMany("Questions")
|
|
||||||
.HasForeignKey("QuestionnaireId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Questionnaire");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Footer", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("FooterSocialMedias");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Question", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Answers");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Questionnaire", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Questions");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.SocialMedia", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("FooterSocialMedias");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Web.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class QuestionTypeEntityRemoved : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.DropTable(
|
|
||||||
name: "QuestionTypeEntities");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.CreateTable(
|
|
||||||
name: "QuestionTypeEntities",
|
|
||||||
columns: table => new
|
|
||||||
{
|
|
||||||
Id = table.Column<int>(type: "int", nullable: false)
|
|
||||||
.Annotation("SqlServer:Identity", "1, 1"),
|
|
||||||
Type = table.Column<int>(type: "int", nullable: false)
|
|
||||||
},
|
|
||||||
constraints: table =>
|
|
||||||
{
|
|
||||||
table.PrimaryKey("PK_QuestionTypeEntities", x => x.Id);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,54 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Web.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class QeustionAndAnswerNameAdded : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Text",
|
|
||||||
table: "Questions",
|
|
||||||
type: "nvarchar(max)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "nvarchar(max)",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Text",
|
|
||||||
table: "Answers",
|
|
||||||
type: "nvarchar(max)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "nvarchar(max)",
|
|
||||||
oldNullable: true);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Text",
|
|
||||||
table: "Questions",
|
|
||||||
type: "nvarchar(max)",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "nvarchar(max)");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Text",
|
|
||||||
table: "Answers",
|
|
||||||
type: "nvarchar(max)",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "nvarchar(max)");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,355 +0,0 @@
|
||||||
// <auto-generated />
|
|
||||||
using System;
|
|
||||||
using Data;
|
|
||||||
using Microsoft.EntityFrameworkCore;
|
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
||||||
using Microsoft.EntityFrameworkCore.Metadata;
|
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Web.Migrations
|
|
||||||
{
|
|
||||||
[DbContext(typeof(SurveyContext))]
|
|
||||||
[Migration("20240326164756_requiredRevmoedFromQuestionAndAnswer")]
|
|
||||||
partial class requiredRevmoedFromQuestionAndAnswer
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
|
||||||
{
|
|
||||||
#pragma warning disable 612, 618
|
|
||||||
modelBuilder
|
|
||||||
.HasAnnotation("ProductVersion", "8.0.2")
|
|
||||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
|
||||||
|
|
||||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Address", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("CVR")
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("City")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Country")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Email")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Mobile")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("PostalCode")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("State")
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Street")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Addresss");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Answer", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<int>("QuestionId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<string>("Text")
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("QuestionId");
|
|
||||||
|
|
||||||
b.ToTable("Answers");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Banner", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("Content")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("ImageUrl")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("LinkUrl")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Banners");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Footer", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("Content")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("CreatedBy")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("ImageUlr")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<DateTime>("LastUpdated")
|
|
||||||
.HasColumnType("datetime2");
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Owner")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Sitecopyright")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("UpdatedBy")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Footers");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.FooterSocialMedia", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("FooterId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<int>("SocialId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.HasKey("FooterId", "SocialId");
|
|
||||||
|
|
||||||
b.HasIndex("SocialId");
|
|
||||||
|
|
||||||
b.ToTable("FooterSocialMedias");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Page", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<int>("BannerId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<string>("Content")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Slug")
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("BannerId");
|
|
||||||
|
|
||||||
b.ToTable("Pages");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Question", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<int>("QuestionnaireId")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.Property<string>("Text")
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<int>("Type")
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.HasIndex("QuestionnaireId");
|
|
||||||
|
|
||||||
b.ToTable("Questions");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Questionnaire", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Title")
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("Questionnaires");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.SocialMedia", b =>
|
|
||||||
{
|
|
||||||
b.Property<int>("Id")
|
|
||||||
.ValueGeneratedOnAdd()
|
|
||||||
.HasColumnType("int");
|
|
||||||
|
|
||||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
||||||
|
|
||||||
b.Property<string>("Name")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.Property<string>("Url")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
|
||||||
|
|
||||||
b.ToTable("SocialMedia");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Answer", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("Model.Question", "Question")
|
|
||||||
.WithMany("Answers")
|
|
||||||
.HasForeignKey("QuestionId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Question");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.FooterSocialMedia", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("Model.Footer", "Footer")
|
|
||||||
.WithMany("FooterSocialMedias")
|
|
||||||
.HasForeignKey("FooterId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.HasOne("Model.SocialMedia", "SocialMedia")
|
|
||||||
.WithMany("FooterSocialMedias")
|
|
||||||
.HasForeignKey("SocialId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Footer");
|
|
||||||
|
|
||||||
b.Navigation("SocialMedia");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Page", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("Model.Banner", "banner")
|
|
||||||
.WithMany()
|
|
||||||
.HasForeignKey("BannerId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("banner");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Question", b =>
|
|
||||||
{
|
|
||||||
b.HasOne("Model.Questionnaire", "Questionnaire")
|
|
||||||
.WithMany("Questions")
|
|
||||||
.HasForeignKey("QuestionnaireId")
|
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Questionnaire");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Footer", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("FooterSocialMedias");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Question", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Answers");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Questionnaire", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("Questions");
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("Model.SocialMedia", b =>
|
|
||||||
{
|
|
||||||
b.Navigation("FooterSocialMedias");
|
|
||||||
});
|
|
||||||
#pragma warning restore 612, 618
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,54 +0,0 @@
|
||||||
using Microsoft.EntityFrameworkCore.Migrations;
|
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
namespace Web.Migrations
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public partial class requiredRevmoedFromQuestionAndAnswer : Migration
|
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Text",
|
|
||||||
table: "Questions",
|
|
||||||
type: "nvarchar(max)",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "nvarchar(max)");
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Text",
|
|
||||||
table: "Answers",
|
|
||||||
type: "nvarchar(max)",
|
|
||||||
nullable: true,
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "nvarchar(max)");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
protected override void Down(MigrationBuilder migrationBuilder)
|
|
||||||
{
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Text",
|
|
||||||
table: "Questions",
|
|
||||||
type: "nvarchar(max)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "nvarchar(max)",
|
|
||||||
oldNullable: true);
|
|
||||||
|
|
||||||
migrationBuilder.AlterColumn<string>(
|
|
||||||
name: "Text",
|
|
||||||
table: "Answers",
|
|
||||||
type: "nvarchar(max)",
|
|
||||||
nullable: false,
|
|
||||||
defaultValue: "",
|
|
||||||
oldClrType: typeof(string),
|
|
||||||
oldType: "nvarchar(max)",
|
|
||||||
oldNullable: true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -12,8 +12,8 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
namespace Web.Migrations
|
namespace Web.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(SurveyContext))]
|
[DbContext(typeof(SurveyContext))]
|
||||||
[Migration("20240326164015_QeustionAndAnswerNameAdded")]
|
[Migration("20240327153248_DataBaseCreated")]
|
||||||
partial class QeustionAndAnswerNameAdded
|
partial class DataBaseCreated
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
|
|
@ -80,7 +80,6 @@ namespace Web.Migrations
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<string>("Text")
|
b.Property<string>("Text")
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
@ -201,6 +200,9 @@ namespace Web.Migrations
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("FooterId")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<string>("Slug")
|
b.Property<string>("Slug")
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
|
@ -212,6 +214,8 @@ namespace Web.Migrations
|
||||||
|
|
||||||
b.HasIndex("BannerId");
|
b.HasIndex("BannerId");
|
||||||
|
|
||||||
|
b.HasIndex("FooterId");
|
||||||
|
|
||||||
b.ToTable("Pages");
|
b.ToTable("Pages");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -227,7 +231,6 @@ namespace Web.Migrations
|
||||||
.HasColumnType("int");
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<string>("Text")
|
b.Property<string>("Text")
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<int>("Type")
|
b.Property<int>("Type")
|
||||||
|
|
@ -318,7 +321,15 @@ namespace Web.Migrations
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
|
|
||||||
|
b.HasOne("Model.Footer", "footer")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("FooterId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
b.Navigation("banner");
|
b.Navigation("banner");
|
||||||
|
|
||||||
|
b.Navigation("footer");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Question", b =>
|
modelBuilder.Entity("Model.Question", b =>
|
||||||
|
|
@ -6,7 +6,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
namespace Web.Migrations
|
namespace Web.Migrations
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public partial class Initial : Migration
|
public partial class DataBaseCreated : Migration
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
|
@ -69,6 +69,20 @@ namespace Web.Migrations
|
||||||
table.PrimaryKey("PK_Footers", x => x.Id);
|
table.PrimaryKey("PK_Footers", x => x.Id);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "Questionnaires",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<int>(type: "int", nullable: false)
|
||||||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||||||
|
Title = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
|
Description = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_Questionnaires", x => x.Id);
|
||||||
|
});
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
migrationBuilder.CreateTable(
|
||||||
name: "SocialMedia",
|
name: "SocialMedia",
|
||||||
columns: table => new
|
columns: table => new
|
||||||
|
|
@ -92,6 +106,7 @@ namespace Web.Migrations
|
||||||
Title = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
Title = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
Slug = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
Slug = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
Content = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
Content = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||||
|
FooterId = table.Column<int>(type: "int", nullable: false),
|
||||||
BannerId = table.Column<int>(type: "int", nullable: false)
|
BannerId = table.Column<int>(type: "int", nullable: false)
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
|
|
@ -103,6 +118,33 @@ namespace Web.Migrations
|
||||||
principalTable: "Banners",
|
principalTable: "Banners",
|
||||||
principalColumn: "Id",
|
principalColumn: "Id",
|
||||||
onDelete: ReferentialAction.Cascade);
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_Pages_Footers_FooterId",
|
||||||
|
column: x => x.FooterId,
|
||||||
|
principalTable: "Footers",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "Questions",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<int>(type: "int", nullable: false)
|
||||||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||||||
|
Text = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
|
Type = table.Column<int>(type: "int", nullable: false),
|
||||||
|
QuestionnaireId = table.Column<int>(type: "int", nullable: false)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_Questions", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_Questions_Questionnaires_QuestionnaireId",
|
||||||
|
column: x => x.QuestionnaireId,
|
||||||
|
principalTable: "Questionnaires",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
});
|
});
|
||||||
|
|
||||||
migrationBuilder.CreateTable(
|
migrationBuilder.CreateTable(
|
||||||
|
|
@ -129,6 +171,31 @@ namespace Web.Migrations
|
||||||
onDelete: ReferentialAction.Cascade);
|
onDelete: ReferentialAction.Cascade);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateTable(
|
||||||
|
name: "Answers",
|
||||||
|
columns: table => new
|
||||||
|
{
|
||||||
|
Id = table.Column<int>(type: "int", nullable: false)
|
||||||
|
.Annotation("SqlServer:Identity", "1, 1"),
|
||||||
|
Text = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
|
QuestionId = table.Column<int>(type: "int", nullable: false)
|
||||||
|
},
|
||||||
|
constraints: table =>
|
||||||
|
{
|
||||||
|
table.PrimaryKey("PK_Answers", x => x.Id);
|
||||||
|
table.ForeignKey(
|
||||||
|
name: "FK_Answers_Questions_QuestionId",
|
||||||
|
column: x => x.QuestionId,
|
||||||
|
principalTable: "Questions",
|
||||||
|
principalColumn: "Id",
|
||||||
|
onDelete: ReferentialAction.Cascade);
|
||||||
|
});
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Answers_QuestionId",
|
||||||
|
table: "Answers",
|
||||||
|
column: "QuestionId");
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
name: "IX_FooterSocialMedias_SocialId",
|
name: "IX_FooterSocialMedias_SocialId",
|
||||||
table: "FooterSocialMedias",
|
table: "FooterSocialMedias",
|
||||||
|
|
@ -138,6 +205,16 @@ namespace Web.Migrations
|
||||||
name: "IX_Pages_BannerId",
|
name: "IX_Pages_BannerId",
|
||||||
table: "Pages",
|
table: "Pages",
|
||||||
column: "BannerId");
|
column: "BannerId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Pages_FooterId",
|
||||||
|
table: "Pages",
|
||||||
|
column: "FooterId");
|
||||||
|
|
||||||
|
migrationBuilder.CreateIndex(
|
||||||
|
name: "IX_Questions_QuestionnaireId",
|
||||||
|
table: "Questions",
|
||||||
|
column: "QuestionnaireId");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
|
@ -146,6 +223,9 @@ namespace Web.Migrations
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "Addresss");
|
name: "Addresss");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "Answers");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "FooterSocialMedias");
|
name: "FooterSocialMedias");
|
||||||
|
|
||||||
|
|
@ -153,13 +233,19 @@ namespace Web.Migrations
|
||||||
name: "Pages");
|
name: "Pages");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "Footers");
|
name: "Questions");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "SocialMedia");
|
name: "SocialMedia");
|
||||||
|
|
||||||
migrationBuilder.DropTable(
|
migrationBuilder.DropTable(
|
||||||
name: "Banners");
|
name: "Banners");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "Footers");
|
||||||
|
|
||||||
|
migrationBuilder.DropTable(
|
||||||
|
name: "Questionnaires");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -197,6 +197,9 @@ namespace Web.Migrations
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
b.Property<int>("FooterId")
|
||||||
|
.HasColumnType("int");
|
||||||
|
|
||||||
b.Property<string>("Slug")
|
b.Property<string>("Slug")
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
|
|
@ -208,6 +211,8 @@ namespace Web.Migrations
|
||||||
|
|
||||||
b.HasIndex("BannerId");
|
b.HasIndex("BannerId");
|
||||||
|
|
||||||
|
b.HasIndex("FooterId");
|
||||||
|
|
||||||
b.ToTable("Pages");
|
b.ToTable("Pages");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -313,7 +318,15 @@ namespace Web.Migrations
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
|
|
||||||
|
b.HasOne("Model.Footer", "footer")
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("FooterId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
b.Navigation("banner");
|
b.Navigation("banner");
|
||||||
|
|
||||||
|
b.Navigation("footer");
|
||||||
});
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Model.Question", b =>
|
modelBuilder.Entity("Model.Question", b =>
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ using Microsoft.Extensions.DependencyInjection;
|
||||||
using Services.Implemnetation;
|
using Services.Implemnetation;
|
||||||
using Services.Interaces;
|
using Services.Interaces;
|
||||||
using Web.Extesions;
|
using Web.Extesions;
|
||||||
|
using Web.ViewComponents;
|
||||||
|
|
||||||
var builder = WebApplication.CreateBuilder(args);
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
|
|
||||||
|
|
@ -20,7 +21,7 @@ builder.Services.AddDbContext<SurveyContext>(options =>
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
//builder.Services.ConfigureSQLConnection(builder.Configuration);
|
|
||||||
|
|
||||||
builder.Services.ConfigurePageServices();
|
builder.Services.ConfigurePageServices();
|
||||||
builder.Services.ConfigureBannerServices();
|
builder.Services.ConfigureBannerServices();
|
||||||
|
|
@ -30,6 +31,7 @@ builder.Services.ConfigureFooter();
|
||||||
builder.Services.ConfigureQuestionnarie();
|
builder.Services.ConfigureQuestionnarie();
|
||||||
builder.Services.ConfigureQuestion();
|
builder.Services.ConfigureQuestion();
|
||||||
builder.Services.AddScoped<SurveyContext>();
|
builder.Services.AddScoped<SurveyContext>();
|
||||||
|
builder.Services.AddTransient<NavigationViewComponent>();
|
||||||
|
|
||||||
var app = builder.Build();
|
var app = builder.Build();
|
||||||
|
|
||||||
|
|
@ -49,6 +51,11 @@ app.UseRouting();
|
||||||
app.UseAuthorization();
|
app.UseAuthorization();
|
||||||
|
|
||||||
|
|
||||||
|
app.MapControllerRoute(
|
||||||
|
name: "page",
|
||||||
|
pattern: "{slug}", defaults: new { Controller = "Home", Action = "Index" });
|
||||||
|
|
||||||
|
|
||||||
app.MapAreaControllerRoute(
|
app.MapAreaControllerRoute(
|
||||||
name: "MyAdminArea",
|
name: "MyAdminArea",
|
||||||
areaName:"admin",
|
areaName:"admin",
|
||||||
|
|
|
||||||
24
Web/ViewComponents/AddressViewComponent.cs
Normal file
24
Web/ViewComponents/AddressViewComponent.cs
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Services.Implemnetation;
|
||||||
|
using Services.Interaces;
|
||||||
|
|
||||||
|
namespace Web.ViewComponents
|
||||||
|
{
|
||||||
|
public class AddressViewComponent:ViewComponent
|
||||||
|
{
|
||||||
|
private readonly IAddressRepository _addressRepository;
|
||||||
|
|
||||||
|
public AddressViewComponent(IAddressRepository addressRepository)
|
||||||
|
{
|
||||||
|
_addressRepository = addressRepository;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IViewComponentResult> InvokeAsync()
|
||||||
|
{
|
||||||
|
|
||||||
|
var address = await _addressRepository.GetAddressesAsync();
|
||||||
|
|
||||||
|
return View(address);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
25
Web/ViewComponents/BannerViewComponent.cs
Normal file
25
Web/ViewComponents/BannerViewComponent.cs
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Services.Interaces;
|
||||||
|
|
||||||
|
namespace Web.ViewComponents
|
||||||
|
{
|
||||||
|
public class BannerViewComponent:ViewComponent
|
||||||
|
{
|
||||||
|
|
||||||
|
private readonly IBannerRepository _bannerRepository;
|
||||||
|
|
||||||
|
public BannerViewComponent(IBannerRepository bannerRepository)
|
||||||
|
{
|
||||||
|
|
||||||
|
_bannerRepository = bannerRepository;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IViewComponentResult> InvokeAsync()
|
||||||
|
{
|
||||||
|
int bannerId = (int)TempData["bannerId"];
|
||||||
|
var Banner = await _bannerRepository.GetBannerByIdAsync(bannerId);
|
||||||
|
|
||||||
|
return View(Banner);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
52
Web/ViewComponents/FooterViewComponent.cs
Normal file
52
Web/ViewComponents/FooterViewComponent.cs
Normal file
|
|
@ -0,0 +1,52 @@
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Services.Implemnetation;
|
||||||
|
using Services.Interaces;
|
||||||
|
|
||||||
|
namespace Web.ViewComponents
|
||||||
|
{
|
||||||
|
public class FooterViewComponent:ViewComponent
|
||||||
|
{
|
||||||
|
private readonly IFooterRepository _footerRepository;
|
||||||
|
|
||||||
|
public FooterViewComponent(IFooterRepository footerRepository)
|
||||||
|
{
|
||||||
|
_footerRepository = footerRepository;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public IViewComponentResult Invoke()
|
||||||
|
{
|
||||||
|
if (!TempData.ContainsKey("Footer"))
|
||||||
|
{
|
||||||
|
// Handle the case where "Footer" is not found in TempData
|
||||||
|
// For example, return a default view or perform a different action
|
||||||
|
return View("DefaultFooterView"); // Return a default view named "DefaultFooterView"
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!int.TryParse(TempData["Footer"].ToString(), out int footerId))
|
||||||
|
{
|
||||||
|
// Handle the case where "Footer" value is not a valid integer
|
||||||
|
// For example, return a default view or perform a different action
|
||||||
|
return View("DefaultFooterView"); // Return a default view named "DefaultFooterView"
|
||||||
|
}
|
||||||
|
|
||||||
|
var footer = _footerRepository.GetFooterByIdWithSocialMedia(footerId);
|
||||||
|
|
||||||
|
if (footer == null)
|
||||||
|
{
|
||||||
|
// Handle the case where the footer is not found
|
||||||
|
// For example, return a default view or perform a different action
|
||||||
|
return View("DefaultFooterView"); // Return a default view named "DefaultFooterView"
|
||||||
|
}
|
||||||
|
|
||||||
|
return View(footer);
|
||||||
|
}
|
||||||
|
|
||||||
|
//public IViewComponentResult Invoke()
|
||||||
|
//{
|
||||||
|
// int footerId = (int)TempData["bannerId"];
|
||||||
|
// var footer = _footerRepository.GetFooterById(footerId);
|
||||||
|
// return View(footer);
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
}
|
||||||
20
Web/ViewComponents/NavigationFooterViewComponent.cs
Normal file
20
Web/ViewComponents/NavigationFooterViewComponent.cs
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Services.Interaces;
|
||||||
|
|
||||||
|
namespace Web.ViewComponents
|
||||||
|
{
|
||||||
|
public class NavigationFooterViewComponent:ViewComponent
|
||||||
|
{
|
||||||
|
private readonly IPageRepository _pageRepository;
|
||||||
|
|
||||||
|
public NavigationFooterViewComponent(IPageRepository pageRepository)
|
||||||
|
{
|
||||||
|
_pageRepository = pageRepository;
|
||||||
|
}
|
||||||
|
public async Task<IViewComponentResult> InvokeAsync()
|
||||||
|
{
|
||||||
|
var pages = await _pageRepository.GetPages();
|
||||||
|
return View(pages);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
21
Web/ViewComponents/NavigationViewComponent.cs
Normal file
21
Web/ViewComponents/NavigationViewComponent.cs
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Services.Interaces;
|
||||||
|
|
||||||
|
namespace Web.ViewComponents
|
||||||
|
{
|
||||||
|
public class NavigationViewComponent:ViewComponent
|
||||||
|
{
|
||||||
|
private readonly IPageRepository _pageRepository;
|
||||||
|
|
||||||
|
public NavigationViewComponent(IPageRepository pageRepository)
|
||||||
|
{
|
||||||
|
_pageRepository = pageRepository;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IViewComponentResult> InvokeAsync()
|
||||||
|
{
|
||||||
|
var pages = await _pageRepository.GetPages();
|
||||||
|
return View(pages);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -15,6 +15,13 @@ namespace Web.ViewModel.PageVM
|
||||||
public string? Content { get; set; }
|
public string? Content { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
[DisplayName("Footer")]
|
||||||
|
public int FooterId { get; set; }
|
||||||
|
|
||||||
|
[ForeignKey("FooterId")]
|
||||||
|
public Footer? Footer { get; set; }
|
||||||
|
|
||||||
|
|
||||||
[DisplayName("Banner")]
|
[DisplayName("Banner")]
|
||||||
public int BannerId { get; set; }
|
public int BannerId { get; set; }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ namespace Web.ViewModel.QuestionnaireVM
|
||||||
[Required]
|
[Required]
|
||||||
|
|
||||||
[Display(Name ="Questionnaire title")]
|
[Display(Name ="Questionnaire title")]
|
||||||
[StringLength(100, ErrorMessage = "Title must be between 1 and 40 characters.", MinimumLength = 1)]
|
[StringLength(40, ErrorMessage = "Title must be between 1 and 40 characters.", MinimumLength = 1)]
|
||||||
public string? Title { get; set; }
|
public string? Title { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public string? Description { get; set; }
|
public string? Description { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ namespace Web.ViewModel.QuestionnaireVM
|
||||||
}
|
}
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
[StringLength(100, ErrorMessage = "Title must be between 1 and 40 characters.", MinimumLength = 1)]
|
[StringLength(40, ErrorMessage = "Title must be between 1 and 40 characters.", MinimumLength = 1)]
|
||||||
public string? Title { get; set; }
|
public string? Title { get; set; }
|
||||||
[Required]
|
[Required]
|
||||||
public string? Description { get; set; }
|
public string? Description { get; set; }
|
||||||
|
|
|
||||||
6
Web/Views/Home/Error.cshtml
Normal file
6
Web/Views/Home/Error.cshtml
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
@{
|
||||||
|
ViewData["Title"] = "Home Page";
|
||||||
|
}
|
||||||
|
<h1>Error</h1>
|
||||||
|
|
||||||
|
<p class="alert alert-danger">Something went wrong.....</p>
|
||||||
|
|
@ -1,42 +1,35 @@
|
||||||
@{
|
@model Page
|
||||||
|
@{
|
||||||
ViewData["Title"] = "Home Page";
|
ViewData["Title"] = "Home Page";
|
||||||
}
|
}
|
||||||
|
|
||||||
<div id="carouselExampleIndicators" class="carousel slide" data-bs-ride="carousel">
|
|
||||||
<ol class="carousel-indicators">
|
|
||||||
<li data-bs-target="#carouselExampleIndicators" data-bs-slide-to="0" class="active"></li>
|
|
||||||
<li data-bs-target="#carouselExampleIndicators" data-bs-slide-to="1"></li>
|
|
||||||
<li data-bs-target="#carouselExampleIndicators" data-bs-slide-to="2"></li>
|
|
||||||
</ol>
|
<!-- FOR DEMO PURPOSE -->
|
||||||
<div class="carousel-inner">
|
<section id="MainContent" class="hero text-white">
|
||||||
<div class="carousel-item active">
|
<div class="container py-1">
|
||||||
<img src="https://mdbootstrap.com/img/Photos/Slides/img%20(45).jpg"
|
@* <div class="col-12" id="boxBanner">
|
||||||
class="d-block w-100"
|
<h1 class="display-6 text-white font-weight-bold">@Model.Description.ToUpper()</h1>
|
||||||
alt="first slide" />
|
</div> *@
|
||||||
|
<div id="rowSectionMain">
|
||||||
|
|
||||||
|
<div class="col-lg-12" id="boxMain">
|
||||||
|
<div class="display-6 font-weight-bold text-white">@Model.Title.ToUpper()</div>
|
||||||
|
|
||||||
|
|
||||||
|
@* <p class="fst-italic text-muted">@Html.Raw(Model.Content) <a class="text-primary" href="@Model.Sitecopyright" target="_blank">SeoSoft</a></p> *@
|
||||||
|
<p class="text-white">@Html.Raw(Model.Content)</p>
|
||||||
|
<a href="#" class="btn mt-1" id="HomeButon"> Contact <i class="bi bi-ui-checks"></i></a>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="carousel-item">
|
|
||||||
<img src="https://mdbootstrap.com/img/Photos/Slides/img%20(46).jpg"
|
|
||||||
class="d-block w-100"
|
|
||||||
alt="second slide" />
|
|
||||||
</div>
|
|
||||||
<div class="carousel-item">
|
|
||||||
<img src="https://mdbootstrap.com/img/Photos/Slides/img%20(47).jpg"
|
|
||||||
class="d-block w-100"
|
|
||||||
alt="third slide" />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a class="carousel-control-prev"
|
</section>
|
||||||
href="#carouselExampleIndicators"
|
|
||||||
role="button"
|
|
||||||
data-bs-slide="prev">
|
|
||||||
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
|
|
||||||
<span class="sr-only">Previous</span>
|
|
||||||
</a>
|
|
||||||
<a class="carousel-control-next"
|
|
||||||
href="#carouselExampleIndicators"
|
|
||||||
role="button"
|
|
||||||
data-bs-slide="next">
|
|
||||||
<span class="carousel-control-next-icon" aria-hidden="true"></span>
|
|
||||||
<span class="sr-only">Next</span>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
|
||||||
40
Web/Views/Shared/Components/Address/Default.cshtml
Normal file
40
Web/Views/Shared/Components/Address/Default.cshtml
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
@model List<Address>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-lg-2 col-md-6">
|
||||||
|
<h5 class="text-white mb-3">Address</h5>
|
||||||
|
@foreach (var item in Model.Take(1))
|
||||||
|
{
|
||||||
|
<p class="line-spacing text-white text-muted">
|
||||||
|
|
||||||
|
<strong>Street:</strong> @item.Street <br>
|
||||||
|
<strong>City:</strong> @item.City <br>
|
||||||
|
<strong>State:</strong> @item.State <br>
|
||||||
|
<strong>Postal Code:</strong> @item.PostalCode <br>
|
||||||
|
<strong>Country:</strong> @item.Country <br>
|
||||||
|
|
||||||
|
|
||||||
|
</p>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-2 col-md-6">
|
||||||
|
<h5 class="text-white mb-3">Contact</h5>
|
||||||
|
@foreach (var item in Model.Take(1))
|
||||||
|
{
|
||||||
|
<p class="line-spacing text-white text-muted">
|
||||||
|
|
||||||
|
<strong>Email:</strong> <a id="LinkColor" href="mailto:@item.Email">@item.Email</a> <br>
|
||||||
|
<strong>Mobile:</strong> <a id="LinkColor" href="tel:@item.Mobile">@item.Mobile</a> <br>
|
||||||
|
|
||||||
|
<strong>CVR:</strong> @item.CVR <br>
|
||||||
|
|
||||||
|
</p>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
31
Web/Views/Shared/Components/Banner/Default.cshtml
Normal file
31
Web/Views/Shared/Components/Banner/Default.cshtml
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
@model Banner
|
||||||
|
|
||||||
|
<div class="d-flex flex-column" id="BannerBackground">
|
||||||
|
|
||||||
|
<!-- FOR DEMO PURPOSE -->
|
||||||
|
<section class="hero text-white">
|
||||||
|
<div class="container py-1">
|
||||||
|
@* <div class="col-12" id="boxBanner">
|
||||||
|
<h1 class="display-6 text-white font-weight-bold">@Model.Description.ToUpper()</h1>
|
||||||
|
</div> *@
|
||||||
|
<div id="rowSectionBanner">
|
||||||
|
|
||||||
|
<div class="col-lg-6" id="boxBanner">
|
||||||
|
<h1 class="display-6 font-weight-bold" id="BtnColor">@Model.Title.ToUpper()</h1>
|
||||||
|
<h6 class="text-white font-weight-bold">@Model.Description.ToUpper()</h6>
|
||||||
|
|
||||||
|
@* <p class="fst-italic text-muted">@Html.Raw(Model.Content) <a class="text-primary" href="@Model.Sitecopyright" target="_blank">SeoSoft</a></p> *@
|
||||||
|
<p class="text-white">@Html.Raw(Model.Content)</p>
|
||||||
|
<a href="@Model.LinkUrl" class="btn mt-1" id="BannerButon"> Contact <i class="bi bi-ui-checks"></i></a>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6" id="boxBanner">
|
||||||
|
<script src="https://unpkg.com/@@dotlottie/player-component@latest/dist/dotlottie-player.mjs" type="module"></script>
|
||||||
|
<dotlottie-player src="@Model.ImageUrl" class="img-fluid" speed="1" style="width: auto; height: auto;" direction="1" playMode="normal" loop autoplay></dotlottie-player>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
94
Web/Views/Shared/Components/Footer/Default.cshtml
Normal file
94
Web/Views/Shared/Components/Footer/Default.cshtml
Normal file
|
|
@ -0,0 +1,94 @@
|
||||||
|
@model Footer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="d-flex flex-column" id="Background">
|
||||||
|
|
||||||
|
<!-- FOR DEMO PURPOSE -->
|
||||||
|
<section class="hero text-white flex-grow-1">
|
||||||
|
<div class="container py-4">
|
||||||
|
<div id="rowSection">
|
||||||
|
<div class="col-lg-6" id="box">
|
||||||
|
<h1 class="display-6 text-white font-weight-bold">@Model.Title.ToUpper()</h1>
|
||||||
|
@* <p class="fst-italic text-muted">@Html.Raw(Model.Content) <a class="text-primary" href="@Model.Sitecopyright" target="_blank">SeoSoft</a></p> *@
|
||||||
|
but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-6" id="box">
|
||||||
|
<script src="https://unpkg.com/@@dotlottie/player-component@latest/dist/dotlottie-player.mjs" type="module"></script>
|
||||||
|
<dotlottie-player src="https://lottie.host/f2df0cd6-fbde-4071-ab90-d9e74a075d5a/ygq5zJ9mzx.json" class="img-fluid" speed="1" style="width: auto; height: auto;" direction="1" playMode="normal" loop autoplay></dotlottie-player>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- FOOTER -->
|
||||||
|
<footer class="w-100 py-4 flex-shrink-0">
|
||||||
|
<div class="container py-4">
|
||||||
|
<div class="row justify-content-around">
|
||||||
|
<vc:address></vc:address>
|
||||||
|
<div class="col-lg-2 col-md-6">
|
||||||
|
<vc:navigation-footer></vc:navigation-footer>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-lg-4 col-md-6">
|
||||||
|
<h5 class="text-white mb-3">Newsletter</h5>
|
||||||
|
|
||||||
|
<form action="#">
|
||||||
|
<div class="input-group mb-3">
|
||||||
|
<input class="form-control" type="text" placeholder="Recipient's username" aria-label="Email" aria-describedby="button-addon2">
|
||||||
|
<button class="btn" id="BannerButon" type="button">Subscribe</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<ul class="list-unstyled text-muted">
|
||||||
|
@foreach (var footerSocialMedia in Model.FooterSocialMedias)
|
||||||
|
{
|
||||||
|
<li class="nav-item">
|
||||||
|
<a id="LinkColor" href="@footerSocialMedia.SocialMedia.Url" target="_blank">@footerSocialMedia.SocialMedia.Name</a>
|
||||||
|
</li>
|
||||||
|
}
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<hr class="border border-primary border-start-0 border-1 opacity-35">
|
||||||
|
<div class="row d-flex justify-content-around">
|
||||||
|
|
||||||
|
<div class="col-lg-2 col-md-3">
|
||||||
|
<span class=" muted">Designed by @Model.CreatedBy</span>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-2 col-md-3">
|
||||||
|
<span class=" muted">Update by @Model.UpdatedBy</span>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-2 col-md-3">
|
||||||
|
<span class=" muted">Updated @Model.LastUpdated.ToShortDateString()</span>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-2 col-md-3">
|
||||||
|
<span class=" muted">Owner @Model.Owner</span>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
10
Web/Views/Shared/Components/Navigation/Default.cshtml
Normal file
10
Web/Views/Shared/Components/Navigation/Default.cshtml
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
@model List<Page>
|
||||||
|
|
||||||
|
@foreach (var item in Model)
|
||||||
|
{
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link font-weight-normal" asp-controller="Home" asp-action="Index" asp-route-slug="@item.Slug">@item.Title</a>
|
||||||
|
</li>
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
17
Web/Views/Shared/Components/NavigationFooter/Default.cshtml
Normal file
17
Web/Views/Shared/Components/NavigationFooter/Default.cshtml
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
@model List<Page>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h5 class="text-white">Navigation</h5>
|
||||||
|
<ul class="list-unstyled text-muted">
|
||||||
|
@foreach (var item in Model)
|
||||||
|
{
|
||||||
|
<li class="nav-item">
|
||||||
|
<a id="LinkColor" asp-controller="Home" asp-action="Index" asp-route-slug="@item.Slug">@item.Title</a>
|
||||||
|
</li>
|
||||||
|
}
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -10,40 +10,43 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>
|
<header>
|
||||||
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
|
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light shadow-lg">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">Web</a>
|
<a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">Online survey</a>
|
||||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target=".navbar-collapse" aria-controls="navbarSupportedContent"
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target=".navbar-collapse" aria-controls="navbarSupportedContent"
|
||||||
aria-expanded="false" aria-label="Toggle navigation">
|
aria-expanded="false" aria-label="Toggle navigation">
|
||||||
<span class="navbar-toggler-icon"></span>
|
<span class="navbar-toggler-icon text-white"></span>
|
||||||
</button>
|
</button>
|
||||||
<div class="navbar-collapse collapse d-sm-inline-flex justify-content-between">
|
<div class="navbar-collapse collapse d-sm-inline-flex justify-content-between">
|
||||||
<ul class="navbar-nav flex-grow-1">
|
<ul class="navbar-nav flex-grow-1">
|
||||||
|
<vc:navigation></vc:navigation>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
<ul class="navbar-nav">
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Index">Home</a>
|
<a href="#" class="btn btn-sm " id="BannerButon"> Sign in <i class="bi bi-ui-checks"></i></a> |
|
||||||
</li>
|
<a href="#" class="btn btn-sm" id="BannerButon"> Sign up <i class="bi bi-ui-checks"></i></a>
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link text-dark" asp-area="Admin" asp-controller="Admin" asp-action="Index">Admin</a>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<div class="container">
|
|
||||||
<main role="main" class="pb-3">
|
|
||||||
@RenderBody()
|
|
||||||
</main>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<footer class="border-top footer text-muted">
|
<main role="main">
|
||||||
<div class="container">
|
|
||||||
© 2024 - Web - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
|
<vc:banner></vc:banner>
|
||||||
</div>
|
|
||||||
</footer>
|
@RenderBody()
|
||||||
|
|
||||||
|
</main>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<vc:footer></vc:footer>
|
||||||
|
|
||||||
|
|
||||||
<script src="~/lib/jquery/dist/jquery.min.js"></script>
|
<script src="~/lib/jquery/dist/jquery.min.js"></script>
|
||||||
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
|
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
<script src="~/js/site.js" asp-append-version="true"></script>
|
<script src="~/js/site.js" asp-append-version="true"></script>
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
@using Web
|
@using Web
|
||||||
|
@using Model
|
||||||
@using Web.Models
|
@using Web.Models
|
||||||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
||||||
|
@addTagHelper *,Web
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
|
@ -13,6 +13,7 @@
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.QuickGrid.EntityFrameworkAdapter" Version="8.0.2" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.QuickGrid.EntityFrameworkAdapter" Version="8.0.2" />
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="8.0.3" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.2">
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.2">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
|
@ -26,4 +27,8 @@
|
||||||
<ProjectReference Include="..\Services\Services.csproj" />
|
<ProjectReference Include="..\Services\Services.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Folder Include="wwwroot\Images\" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -35,25 +35,197 @@
|
||||||
--font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
--font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||||
}
|
}
|
||||||
/*_______________________________________________________________________________start of the custom CSS_____________________________________________________________*/
|
/*_______________________________________________________________________________start of the custom CSS_____________________________________________________________*/
|
||||||
|
|
||||||
|
.MainBanner {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-around;
|
||||||
|
padding: 10px;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#BannerBackground {
|
||||||
|
|
||||||
|
background-size: cover;
|
||||||
|
background-position: bottom;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#MainContent {
|
||||||
|
background-color: #33b3ae !important;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
height: 30vh;
|
||||||
|
align-items: center;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#rowSection {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-around;
|
||||||
|
padding: 10px;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
#box
|
||||||
|
{
|
||||||
|
flex: 0 30%;
|
||||||
|
flex-grow: 1;
|
||||||
|
height: auto;
|
||||||
|
width: 300px;
|
||||||
|
margin: 10px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@media (max-width: 992px) {
|
||||||
|
|
||||||
|
|
||||||
|
#rowSection {
|
||||||
|
display:flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-around;
|
||||||
|
padding: 10px;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#box {
|
||||||
|
flex: 50%;
|
||||||
|
|
||||||
|
flex-grow: 1;
|
||||||
|
height: auto;
|
||||||
|
width: 300px;
|
||||||
|
margin: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#rowSectionBanner {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
justify-content: space-around;
|
||||||
|
align-items: center;
|
||||||
|
align-content: center;
|
||||||
|
width: 100%;
|
||||||
|
height: 100vh;
|
||||||
|
flex-direction: row;
|
||||||
|
margin-top:-3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
#boxBanner {
|
||||||
|
display:block;
|
||||||
|
width: auto;
|
||||||
|
height: auto;
|
||||||
|
margin: 5px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@media (max-width: 992px) {
|
||||||
|
|
||||||
|
|
||||||
|
#rowSectionBanner {
|
||||||
|
display: flex;
|
||||||
|
flex-direction:column;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
align-content: center;
|
||||||
|
width: 100%;
|
||||||
|
height: 70vh;
|
||||||
|
margin-top:-5rem;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#boxBanner {
|
||||||
|
width: auto;
|
||||||
|
height: 30%;
|
||||||
|
margin: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@media (max-width: 1400px) {
|
||||||
|
|
||||||
|
|
||||||
|
#MainContent {
|
||||||
|
background-color: #33b3ae !important;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
height: 50vh;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@media (max-width: 992px) {
|
||||||
|
|
||||||
|
|
||||||
|
#MainContent {
|
||||||
|
|
||||||
|
background-color: #33b3ae !important;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
height: 30vh;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero {
|
||||||
|
background-color: #141a23;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer {
|
||||||
|
background: #141a23;
|
||||||
|
}
|
||||||
|
|
||||||
|
#LinkColor {
|
||||||
|
color: #6c757d !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
body, html {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
.question {
|
.question {
|
||||||
margin: 1rem 2rem 0rem 2rem;
|
margin: 1rem 2rem 0rem 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.question-details {
|
.question-details {
|
||||||
padding: 0 4rem 0 4rem;
|
padding: 0 4rem 0 4rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.answers {
|
.answers {
|
||||||
margin: 3rem !important;
|
margin: 3rem !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.wrap-text {
|
||||||
|
white-space: pre-wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.line-spacing {
|
||||||
|
line-height: 2; /* Adjust the value as needed */
|
||||||
|
}
|
||||||
|
|
||||||
#customCard {
|
#customCard {
|
||||||
background-color: #f2f2f2 !important;
|
background-color: #f2f2f2 !important;
|
||||||
margin: 3rem;
|
margin: 3rem;
|
||||||
padding: 3rem 0 2rem 0;
|
padding: 3rem 0 2rem 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.question-title {
|
.question-title {
|
||||||
color: #007bff;
|
color: #007bff;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.question-group {
|
.question-group {
|
||||||
margin-bottom: 20px; /* Adjust the value to control the spacing */
|
margin-bottom: 20px; /* Adjust the value to control the spacing */
|
||||||
}
|
}
|
||||||
|
|
@ -81,10 +253,12 @@
|
||||||
margin-top: -3rem !important;
|
margin-top: -3rem !important;
|
||||||
margin-left: 3rem !important;
|
margin-left: 3rem !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#SaveQuestionForEdit {
|
#SaveQuestionForEdit {
|
||||||
margin-left: 2rem;
|
margin-left: 2rem;
|
||||||
margin-top: 0rem;
|
margin-top: 0rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
#RemoveQuestion1ForEdit {
|
#RemoveQuestion1ForEdit {
|
||||||
margin-left: 2rem;
|
margin-left: 2rem;
|
||||||
margin-top: 2rem;
|
margin-top: 2rem;
|
||||||
|
|
@ -93,45 +267,7 @@
|
||||||
#AddnewAsnwerForCreatr {
|
#AddnewAsnwerForCreatr {
|
||||||
margin-top: -3rem;
|
margin-top: -3rem;
|
||||||
}
|
}
|
||||||
/*.description-container {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.description-text {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.item-description {
|
|
||||||
flex-grow: 1;
|
|
||||||
white-space: normal;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
|
|
||||||
}*/
|
|
||||||
/* Add your custom CSS styles here */
|
|
||||||
/*.question-container {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.question-text {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.item-question {
|
|
||||||
flex-grow: 1;
|
|
||||||
white-space: normal;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
|
|
||||||
.more-question {*/
|
|
||||||
/* Add your more question styles here */
|
|
||||||
/*display: none;
|
|
||||||
}*/
|
|
||||||
#ReadMore {
|
#ReadMore {
|
||||||
margin-top: -13px;
|
margin-top: -13px;
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
|
|
@ -141,6 +277,68 @@
|
||||||
#add-question-btn {
|
#add-question-btn {
|
||||||
margin: 1rem 0 0 2rem;
|
margin: 1rem 0 0 2rem;
|
||||||
}
|
}
|
||||||
|
#BtnColor {
|
||||||
|
color: #33b3ae;
|
||||||
|
}
|
||||||
|
|
||||||
|
#BannerButon {
|
||||||
|
background-color: transparent !important;
|
||||||
|
color: #33b3ae;
|
||||||
|
border: 1px solid #33b3ae !important;
|
||||||
|
box-shadow: 2px 4px 13px -1px rgba(0,0,0,0.75);
|
||||||
|
-webkit-box-shadow: 2px 4px 13px -1px rgba(0,0,0,0.75);
|
||||||
|
-moz-box-shadow: 2px 4px 13px -1px rgba(0,0,0,0.75);
|
||||||
|
}
|
||||||
|
|
||||||
|
#BannerButon:hover {
|
||||||
|
transition: 394ms;
|
||||||
|
|
||||||
|
background-color: #33b3ae !important;
|
||||||
|
color: #ffffff;
|
||||||
|
border: solid 2px #0066cc00;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#HomeButon {
|
||||||
|
background-color: transparent !important;
|
||||||
|
color: #ffffff;
|
||||||
|
border: 1px solid #ffffff !important;
|
||||||
|
box-shadow: 2px 4px 13px -1px rgba(0,0,0,0.75);
|
||||||
|
-webkit-box-shadow: 2px 4px 13px -1px rgba(0,0,0,0.75);
|
||||||
|
-moz-box-shadow: 2px 4px 13px -1px rgba(0,0,0,0.75);
|
||||||
|
}
|
||||||
|
|
||||||
|
#HomeButon:hover {
|
||||||
|
transition: 394ms;
|
||||||
|
background-color: #141a23 !important;
|
||||||
|
color: #33b3ae;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.navbar {
|
||||||
|
margin-bottom: 0px !important;
|
||||||
|
background-color: #161d27 !important;
|
||||||
|
-webkit-box-shadow: 1px 6px 5px -3px rgba(82,81,82,1) !important;
|
||||||
|
-moz-box-shadow: 1px 6px 5px -3px rgba(82,81,82,1) !important;
|
||||||
|
box-shadow: 1px 6px 5px -3px rgba(82,81,82,1) !important;
|
||||||
|
}
|
||||||
|
.navbar-brand {
|
||||||
|
color: #33b3ae !important;
|
||||||
|
}
|
||||||
|
.navbar-toggler {
|
||||||
|
background-color: #33b3ae !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-light .navbar-nav .nav-link {
|
||||||
|
color: #ffffff !important;
|
||||||
|
}
|
||||||
|
.navbar-light .navbar-nav .nav-link:hover {
|
||||||
|
color: #6c757d !important;
|
||||||
|
transition: 394ms;
|
||||||
|
}
|
||||||
/*_______________________________________________________________________________end of the custom CSS_____________________________________________________________*/
|
/*_______________________________________________________________________________end of the custom CSS_____________________________________________________________*/
|
||||||
*,
|
*,
|
||||||
*::before,
|
*::before,
|
||||||
|
|
@ -11752,7 +11950,7 @@ a[data-toggle="collapse"] {
|
||||||
|
|
||||||
@media (max-width: 991.98px) {
|
@media (max-width: 991.98px) {
|
||||||
.footer {
|
.footer {
|
||||||
display: none;
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue