Add project files.

This commit is contained in:
2025-05-01 15:18:30 +03:00
parent e058ab8015
commit 774d695414
3094 changed files with 1336814 additions and 0 deletions

30
.dockerignore Normal file
View File

@@ -0,0 +1,30 @@
**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/azds.yaml
**/bin
**/charts
**/docker-compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
LICENSE
README.md
!**/.gitignore
!.git/HEAD
!.git/config
!.git/packed-refs
!.git/refs/heads/**

View File

@@ -0,0 +1,8 @@
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.BusinessLayer.Abstract
{
public interface ICompanyInfoService :IGenericService<CompanyInfo>
{
}
}

View File

@@ -0,0 +1,8 @@
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.BusinessLayer.Abstract
{
public interface ICompanyInfoVideoService : IGenericService<CompanyInfoVideo>
{
}
}

View File

@@ -0,0 +1,11 @@
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.BusinessLayer.Abstract
{
public interface IContactUsService : IGenericService<ContactUs>
{
int TCountByStatusPending();
int TCountAll();
void TMarkAsRead(int id);
}
}

View File

@@ -0,0 +1,9 @@
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.BusinessLayer.Abstract
{
public interface IFooterService : IGenericService<Footer>
{
Footer TGetFooterDetails();
}
}

View File

@@ -0,0 +1,11 @@
namespace ConstructorApp.BusinessLayer.Abstract
{
public interface IGenericService<T> where T : class
{
void TAdd(T entity);
void TDelete(T entity);
void TUpdate(T entity);
T TGetByID(int id);
List<T> TGetListAll();
}
}

View File

@@ -0,0 +1,8 @@
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.BusinessLayer.Abstract
{
public interface IHomeBannerService : IGenericService<HomeBanner>
{
}
}

View File

@@ -0,0 +1,9 @@
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.BusinessLayer.Abstract
{
public interface IProjectGalleryService : IGenericService<ProjectGallery>
{
List<ProjectGallery> TGetImagesByProjectId(int projectId);
}
}

View File

@@ -0,0 +1,13 @@
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.BusinessLayer.Abstract
{
public interface IProjectService : IGenericService<Project>
{
void TProjectStatusActive(int id);
void TProjectStatusPassive(int id);
int TCountAll();
Project TGetBySlug(string slug);
Project TGetProjectWithImagesBySlug(string slug);
}
}

View File

@@ -0,0 +1,9 @@
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.BusinessLayer.Abstract
{
public interface IReferenceService : IGenericService<Reference>
{
int TCountAll();
}
}

View File

@@ -0,0 +1,10 @@
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.BusinessLayer.Abstract
{
public interface IServiceService : IGenericService<Service>
{
void TServiceStatusActive(int id);
void TServiceStatusPassive(int id);
}
}

View File

@@ -0,0 +1,8 @@
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.BusinessLayer.Abstract
{
public interface ISliderService : IGenericService<Slider>
{
}
}

View File

@@ -0,0 +1,8 @@
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.BusinessLayer.Abstract
{
public interface ITeamService : IGenericService<Team>
{
}
}

View File

@@ -0,0 +1,11 @@
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.BusinessLayer.Abstract
{
public interface ITestimonialService : IGenericService<Testimonial>
{
void TTestimonialStatusActive(int id);
void TTestimonialStatusPassive(int id);
int TCountAll();
}
}

View File

@@ -0,0 +1,10 @@
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.BusinessLayer.Abstract
{
public interface IWorkProcessService : IGenericService<WorkProcess>
{
void TServiceStatusActive(int id);
void TServiceStatusPassive(int id);
}
}

View File

@@ -0,0 +1,41 @@
using ConstructorApp.BusinessLayer.Abstract;
using ConstructorApp.DataAccessLayer.Abstract;
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.BusinessLayer.Concrete
{
public class CompanyInfoManager : ICompanyInfoService
{
private readonly ICompanyInfoDal _companyInfoDal;
public CompanyInfoManager(ICompanyInfoDal companyInfoDal)
{
_companyInfoDal = companyInfoDal;
}
public void TAdd(CompanyInfo entity)
{
_companyInfoDal.Add(entity);
}
public void TDelete(CompanyInfo entity)
{
_companyInfoDal.Delete(entity);
}
public CompanyInfo TGetByID(int id)
{
return _companyInfoDal.GetByID(id);
}
public List<CompanyInfo> TGetListAll()
{
return _companyInfoDal.GetListAll();
}
public void TUpdate(CompanyInfo entity)
{
_companyInfoDal.Update(entity);
}
}
}

View File

@@ -0,0 +1,41 @@
using ConstructorApp.BusinessLayer.Abstract;
using ConstructorApp.DataAccessLayer.Abstract;
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.BusinessLayer.Concrete
{
public class CompanyInfoVideoManager : ICompanyInfoVideoService
{
private readonly ICompanyInfoVideoDal _companyInfoVideoDal;
public CompanyInfoVideoManager(ICompanyInfoVideoDal companyInfoVideoDal)
{
_companyInfoVideoDal = companyInfoVideoDal;
}
public void TAdd(CompanyInfoVideo entity)
{
_companyInfoVideoDal.Add(entity);
}
public void TDelete(CompanyInfoVideo entity)
{
_companyInfoVideoDal.Delete(entity);
}
public CompanyInfoVideo TGetByID(int id)
{
return _companyInfoVideoDal.GetByID(id);
}
public List<CompanyInfoVideo> TGetListAll()
{
return _companyInfoVideoDal.GetListAll();
}
public void TUpdate(CompanyInfoVideo entity)
{
_companyInfoVideoDal.Update(entity);
}
}
}

View File

@@ -0,0 +1,56 @@
using ConstructorApp.BusinessLayer.Abstract;
using ConstructorApp.DataAccessLayer.Abstract;
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.BusinessLayer.Concrete
{
public class ContactUsManager : IContactUsService
{
private readonly IContactUsDal _contactUsDal;
public ContactUsManager(IContactUsDal contactUsDal)
{
_contactUsDal = contactUsDal;
}
public void TAdd(ContactUs entity)
{
_contactUsDal.Add(entity);
}
public int TCountAll()
{
return _contactUsDal.CountAll();
}
public int TCountByStatusPending()
{
return _contactUsDal.CountByStatusPending();
}
public void TDelete(ContactUs entity)
{
_contactUsDal.Delete(entity);
}
public ContactUs TGetByID(int id)
{
return _contactUsDal.GetByID(id);
}
public List<ContactUs> TGetListAll()
{
return _contactUsDal.GetListAll();
}
public void TMarkAsRead(int id)
{
_contactUsDal.MarkAsRead(id);
}
public void TUpdate(ContactUs entity)
{
_contactUsDal.Update(entity);
}
}
}

View File

@@ -0,0 +1,46 @@
using ConstructorApp.BusinessLayer.Abstract;
using ConstructorApp.DataAccessLayer.Abstract;
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.BusinessLayer.Concrete
{
public class FooterManager : IFooterService
{
private readonly IFooterDal _footerDal;
public FooterManager(IFooterDal footerDal)
{
_footerDal = footerDal;
}
public void TAdd(Footer entity)
{
_footerDal.Add(entity);
}
public void TDelete(Footer entity)
{
_footerDal.Delete(entity);
}
public Footer TGetByID(int id)
{
return _footerDal.GetByID(id);
}
public Footer TGetFooterDetails()
{
return _footerDal.GetFooterDetails(); // Footer bilgilerini DAL'dan alır
}
public List<Footer> TGetListAll()
{
return _footerDal.GetListAll();
}
public void TUpdate(Footer entity)
{
_footerDal.Update(entity);
}
}
}

View File

@@ -0,0 +1,41 @@
using ConstructorApp.BusinessLayer.Abstract;
using ConstructorApp.DataAccessLayer.Abstract;
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.BusinessLayer.Concrete
{
public class HomeBannerManager : IHomeBannerService
{
private readonly IHomeBannerDal _homeBannerDal;
public HomeBannerManager(IHomeBannerDal homeBannerDal)
{
_homeBannerDal = homeBannerDal;
}
public void TAdd(HomeBanner entity)
{
_homeBannerDal.Add(entity);
}
public void TDelete(HomeBanner entity)
{
_homeBannerDal.Delete(entity);
}
public HomeBanner TGetByID(int id)
{
return _homeBannerDal.GetByID(id);
}
public List<HomeBanner> TGetListAll()
{
return _homeBannerDal.GetListAll();
}
public void TUpdate(HomeBanner entity)
{
_homeBannerDal.Update(entity);
}
}
}

View File

@@ -0,0 +1,46 @@
using ConstructorApp.BusinessLayer.Abstract;
using ConstructorApp.DataAccessLayer.Abstract;
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.BusinessLayer.Concrete
{
public class ProjectGalleryManager : IProjectGalleryService
{
private readonly IProjectGalleryDal _projectGalleryDal;
public ProjectGalleryManager(IProjectGalleryDal projectGalleryDal)
{
_projectGalleryDal = projectGalleryDal;
}
public void TAdd(ProjectGallery entity)
{
_projectGalleryDal.Add(entity);
}
public void TDelete(ProjectGallery entity)
{
_projectGalleryDal.Delete(entity);
}
public ProjectGallery TGetByID(int id)
{
return _projectGalleryDal.GetByID(id);
}
public List<ProjectGallery> TGetImagesByProjectId(int projectId)
{
return _projectGalleryDal.GetImagesByProjectId(projectId);
}
public List<ProjectGallery> TGetListAll()
{
return _projectGalleryDal.GetListAll();
}
public void TUpdate(ProjectGallery entity)
{
_projectGalleryDal.Update(entity);
}
}
}

View File

@@ -0,0 +1,66 @@
using ConstructorApp.BusinessLayer.Abstract;
using ConstructorApp.DataAccessLayer.Abstract;
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.BusinessLayer.Concrete
{
public class ProjectManager : IProjectService
{
private readonly IProjectDal _projectDal;
public ProjectManager(IProjectDal projectDal)
{
_projectDal = projectDal;
}
public void TAdd(Project entity)
{
_projectDal.Add(entity);
}
public int TCountAll()
{
return _projectDal.CountAll();
}
public void TDelete(Project entity)
{
_projectDal.Delete(entity);
}
public Project TGetByID(int id)
{
return _projectDal.GetByID(id);
}
public Project TGetBySlug(string slug)
{
return _projectDal.GetBySlug(slug);
}
public List<Project> TGetListAll()
{
return _projectDal.GetListAll();
}
public Project TGetProjectWithImagesBySlug(string slug)
{
return _projectDal.GetProjectWithImagesBySlug(slug);
}
public void TProjectStatusActive(int id)
{
_projectDal.ProjectStatusActive(id);
}
public void TProjectStatusPassive(int id)
{
_projectDal.rojectStatusPassive(id);
}
public void TUpdate(Project entity)
{
_projectDal.Update(entity);
}
}
}

View File

@@ -0,0 +1,46 @@
using ConstructorApp.BusinessLayer.Abstract;
using ConstructorApp.DataAccessLayer.Abstract;
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.BusinessLayer.Concrete
{
public class ReferenceManager : IReferenceService
{
private readonly IReferenceDal _referenceDal;
public ReferenceManager(IReferenceDal referenceDal)
{
_referenceDal = referenceDal;
}
public void TAdd(Reference entity)
{
_referenceDal.Add(entity);
}
public int TCountAll()
{
return _referenceDal.CountAll();
}
public void TDelete(Reference entity)
{
_referenceDal.Delete(entity);
}
public Reference TGetByID(int id)
{
return _referenceDal.GetByID(id);
}
public List<Reference> TGetListAll()
{
return _referenceDal.GetListAll();
}
public void TUpdate(Reference entity)
{
_referenceDal.Update(entity);
}
}
}

View File

@@ -0,0 +1,51 @@
using ConstructorApp.BusinessLayer.Abstract;
using ConstructorApp.DataAccessLayer.Abstract;
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.BusinessLayer.Concrete
{
public class ServiceManager : IServiceService
{
private readonly IServiceDal _serviceDal;
public ServiceManager(IServiceDal serviceDal)
{
_serviceDal = serviceDal;
}
public void TAdd(Service entity)
{
_serviceDal.Add(entity);
}
public void TDelete(Service entity)
{
_serviceDal.Delete(entity);
}
public Service TGetByID(int id)
{
return _serviceDal.GetByID(id);
}
public List<Service> TGetListAll()
{
return _serviceDal.GetListAll();
}
public void TServiceStatusActive(int id)
{
_serviceDal.ServiceStatusActive(id);
}
public void TServiceStatusPassive(int id)
{
_serviceDal.ServiceStatusPassive(id);
}
public void TUpdate(Service entity)
{
_serviceDal.Update(entity);
}
}
}

View File

@@ -0,0 +1,41 @@
using ConstructorApp.BusinessLayer.Abstract;
using ConstructorApp.DataAccessLayer.Abstract;
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.BusinessLayer.Concrete
{
public class SliderManager : ISliderService
{
private readonly ISliderDal _sliderDal;
public SliderManager(ISliderDal sliderDal)
{
_sliderDal = sliderDal;
}
public void TAdd(Slider entity)
{
_sliderDal.Add(entity);
}
public void TDelete(Slider entity)
{
_sliderDal.Delete(entity);
}
public Slider TGetByID(int id)
{
return _sliderDal.GetByID(id);
}
public List<Slider> TGetListAll()
{
return _sliderDal.GetListAll();
}
public void TUpdate(Slider entity)
{
_sliderDal.Update(entity);
}
}
}

View File

@@ -0,0 +1,41 @@
using ConstructorApp.BusinessLayer.Abstract;
using ConstructorApp.DataAccessLayer.Abstract;
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.BusinessLayer.Concrete
{
public class TeamManager : ITeamService
{
private readonly ITeamDal _teamDal;
public TeamManager(ITeamDal teamDal)
{
_teamDal = teamDal;
}
public void TAdd(Team entity)
{
_teamDal.Add(entity);
}
public void TDelete(Team entity)
{
_teamDal.Delete(entity);
}
public Team TGetByID(int id)
{
return _teamDal.GetByID(id);
}
public List<Team> TGetListAll()
{
return _teamDal.GetListAll();
}
public void TUpdate(Team entity)
{
_teamDal.Update(entity);
}
}
}

View File

@@ -0,0 +1,56 @@
using ConstructorApp.BusinessLayer.Abstract;
using ConstructorApp.DataAccessLayer.Abstract;
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.BusinessLayer.Concrete
{
public class TestimonialManager : ITestimonialService
{
private readonly ITestimonialDal _testimonialDal;
public TestimonialManager(ITestimonialDal testimonialDal)
{
_testimonialDal = testimonialDal;
}
public void TAdd(Testimonial entity)
{
_testimonialDal.Add(entity);
}
public int TCountAll()
{
return _testimonialDal.CountAll();
}
public void TDelete(Testimonial entity)
{
_testimonialDal.Delete(entity);
}
public Testimonial TGetByID(int id)
{
return _testimonialDal.GetByID(id);
}
public List<Testimonial> TGetListAll()
{
return _testimonialDal.GetListAll();
}
public void TTestimonialStatusActive(int id)
{
_testimonialDal.TestimonialStatusActive(id);
}
public void TTestimonialStatusPassive(int id)
{
_testimonialDal.TestimonialStatusPassive(id);
}
public void TUpdate(Testimonial entity)
{
_testimonialDal.Update(entity);
}
}
}

View File

@@ -0,0 +1,51 @@
using ConstructorApp.BusinessLayer.Abstract;
using ConstructorApp.DataAccessLayer.Abstract;
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.BusinessLayer.Concrete
{
public class WorkProcessManager : IWorkProcessService
{
private readonly IWorkProcessDal _workProcessDal;
public WorkProcessManager(IWorkProcessDal workProcessDal)
{
_workProcessDal = workProcessDal;
}
public void TAdd(WorkProcess entity)
{
_workProcessDal.Add(entity);
}
public void TDelete(WorkProcess entity)
{
_workProcessDal.Delete(entity);
}
public WorkProcess TGetByID(int id)
{
return _workProcessDal.GetByID(id);
}
public List<WorkProcess> TGetListAll()
{
return _workProcessDal.GetListAll();
}
public void TServiceStatusActive(int id)
{
_workProcessDal.ServiceStatusActive(id);
}
public void TServiceStatusPassive(int id)
{
_workProcessDal.ServiceStatusPassive(id);
}
public void TUpdate(WorkProcess entity)
{
_workProcessDal.Update(entity);
}
}
}

View File

@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\ConstructorApp.DataAccessLayer\ConstructorApp.DataAccessLayer.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,56 @@
using ConstructorApp.BusinessLayer.Abstract;
using ConstructorApp.BusinessLayer.Concrete;
using ConstructorApp.DataAccessLayer.Abstract;
using ConstructorApp.DataAccessLayer.EntityFramework;
using Microsoft.Extensions.DependencyInjection;
namespace ConstructorApp.BusinessLayer.Extensions
{
public static class DependencyInjectionExtensions
{
public static IServiceCollection AddBusinessLayerDependencies(this IServiceCollection services)
{
// CompanyInfo Service
services.AddScoped<ICompanyInfoService, CompanyInfoManager>();
services.AddScoped<ICompanyInfoDal, EfCompanyInfoDal>();
// CompanyInfoVideo Service
services.AddScoped<ICompanyInfoVideoService, CompanyInfoVideoManager>();
services.AddScoped<ICompanyInfoVideoDal, EfCompanyInfoVideoDal>();
// ContactUs Service
services.AddScoped<IContactUsService, ContactUsManager>();
services.AddScoped<IContactUsDal, EfContactUsDal>();
// Footer Service
services.AddScoped<IFooterService, FooterManager>();
services.AddScoped<IFooterDal, EfFooterDal>();
// HomeBanner Service
services.AddScoped<IHomeBannerService, HomeBannerManager>();
services.AddScoped<IHomeBannerDal, EfHomeBannerDal>();
// ProjectGallery Service
services.AddScoped<IProjectGalleryService, ProjectGalleryManager>();
services.AddScoped<IProjectGalleryDal, EfProjectGalleryDal>();
// Project Service
services.AddScoped<IProjectService, ProjectManager>();
services.AddScoped<IProjectDal, EfProjectDal>();
// Reference Service
services.AddScoped<IReferenceService, ReferenceManager>();
services.AddScoped<IReferenceDal, EfReferenceDal>();
// Service Service
services.AddScoped<IServiceService, ServiceManager>();
services.AddScoped<IServiceDal, EfServiceDal>();
// Slider Service
services.AddScoped<ISliderService, SliderManager>();
services.AddScoped<ISliderDal, EfSliderDal>();
// Team Service
services.AddScoped<ITeamService, TeamManager>();
services.AddScoped<ITeamDal, EfTeamDal>();
// Testimonial Service
services.AddScoped<ITestimonialService, TestimonialManager>();
services.AddScoped<ITestimonialDal, EfTestimonialDal>();
// WorkProcess Service
services.AddScoped<IWorkProcessService, WorkProcessManager>();
services.AddScoped<IWorkProcessDal, EfWorkProcessDal>();
return services;
}
}
}

View File

@@ -0,0 +1,8 @@
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.DataAccessLayer.Abstract
{
public interface ICompanyInfoDal : IGenericDal<CompanyInfo>
{
}
}

View File

@@ -0,0 +1,8 @@
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.DataAccessLayer.Abstract
{
public interface ICompanyInfoVideoDal : IGenericDal<CompanyInfoVideo>
{
}
}

View File

@@ -0,0 +1,11 @@
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.DataAccessLayer.Abstract
{
public interface IContactUsDal : IGenericDal<ContactUs>
{
int CountByStatusPending();
int CountAll();
void MarkAsRead(int id);
}
}

View File

@@ -0,0 +1,9 @@
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.DataAccessLayer.Abstract
{
public interface IFooterDal : IGenericDal<Footer>
{
Footer GetFooterDetails();
}
}

View File

@@ -0,0 +1,12 @@
namespace ConstructorApp.DataAccessLayer.Abstract
{
public interface IGenericDal<T> where T : class
{
void Add(T entity);
void Delete(T entity);
void Update(T entity);
T GetByID(int id);
List<T> GetListAll();
Task<List<T>> GetListAllAsync();
}
}

View File

@@ -0,0 +1,8 @@
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.DataAccessLayer.Abstract
{
public interface IHomeBannerDal : IGenericDal<HomeBanner>
{
}
}

View File

@@ -0,0 +1,13 @@
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.DataAccessLayer.Abstract
{
public interface IProjectDal : IGenericDal<Project>
{
void ProjectStatusActive(int id);
void rojectStatusPassive(int id);
int CountAll();
Project GetBySlug(string slug);
Project GetProjectWithImagesBySlug(string slug);
}
}

View File

@@ -0,0 +1,9 @@
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.DataAccessLayer.Abstract
{
public interface IProjectGalleryDal : IGenericDal<ProjectGallery>
{
List<ProjectGallery> GetImagesByProjectId(int projectId);
}
}

View File

@@ -0,0 +1,9 @@
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.DataAccessLayer.Abstract
{
public interface IReferenceDal : IGenericDal<Reference>
{
int CountAll();
}
}

View File

@@ -0,0 +1,10 @@
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.DataAccessLayer.Abstract
{
public interface IServiceDal : IGenericDal<Service>
{
void ServiceStatusActive(int id);
void ServiceStatusPassive(int id);
}
}

View File

@@ -0,0 +1,8 @@
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.DataAccessLayer.Abstract
{
public interface ISliderDal : IGenericDal<Slider>
{
}
}

View File

@@ -0,0 +1,8 @@
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.DataAccessLayer.Abstract
{
public interface ITeamDal : IGenericDal<Team>
{
}
}

View File

@@ -0,0 +1,11 @@
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.DataAccessLayer.Abstract
{
public interface ITestimonialDal : IGenericDal<Testimonial>
{
void TestimonialStatusActive(int id);
void TestimonialStatusPassive(int id);
int CountAll();
}
}

View File

@@ -0,0 +1,10 @@
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.DataAccessLayer.Abstract
{
public interface IWorkProcessDal : IGenericDal<WorkProcess>
{
void ServiceStatusActive(int id);
void ServiceStatusPassive(int id);
}
}

View File

@@ -0,0 +1,385 @@
using ConstructorApp.EntityLayer.Entities;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using static ConstructorApp.EntityLayer.Entities.Project;
namespace ConstructorApp.DataAccessLayer.Concrete
{
public class ConstructorContext : IdentityDbContext<AppUser, AppRole, int>
{
public ConstructorContext(DbContextOptions<ConstructorContext> options) : base(options)
{
}
public DbSet<CompanyInfo> CompanyInfo { get; set; }
public DbSet<ContactUs> ContactUs { get; set; }
public DbSet<Footer> Footer { get; set; }
public DbSet<HomeBanner> HomeBanners { get; set; }
public DbSet<Project> Projects { get; set; }
public DbSet<ProjectGallery> ProjectGallery { get; set; }
public DbSet<Service> Services { get; set; }
public DbSet<Slider> Sliders { get; set; }
public DbSet<Team> Teams { get; set; }
public DbSet<Testimonial> Testimonials { get; set; }
public DbSet<WorkProcess> WorkProcess { get; set; }
public DbSet<CompanyInfoVideo> CompanyInfoVideo { get; set; }
public DbSet<Reference> References { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
//lokal migration
//optionsBuilder.UseSqlServer("Server=SABI\\SQLEXPRESS;initial Catalog=CONSTRUCTOR;User ID=sa;Password=13579spP!!!!;Connect Timeout=30;Encrypt=False;TrustServerCertificate=True");
//uzak migration
optionsBuilder.UseSqlServer("Server=94.138.207.4;initial Catalog=CONSTRUCTOR;User ID=sa;Password=13579spP!!!!;Connect Timeout=30;Encrypt=False;TrustServerCertificate=True");
//optionsBuilder.ConfigureWarnings(warnings => warnings.Ignore(RelationalEventId.PendingModelChangesWarning));
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
modelBuilder.Entity<CompanyInfo>().HasData(
new CompanyInfo
{
CompanyInfoID = 1,
Value = "7",
Title = "YIL",
SubTitle = "2011 yılından bu yana sektörde faaliyet göstermekteyiz."
},
new CompanyInfo
{
CompanyInfoID = 2,
Value = "54",
Title = "PROJE",
SubTitle = "Bugüne kadar 54 adet konut projesi tasarladık."
},
new CompanyInfo
{
CompanyInfoID = 3,
Value = "11",
Title = "ÖDÜL",
SubTitle = "Şirketimiz yaratıcılığı nedeniyle birçok kez ödüle layık görüldü."
}
);
var hasher = new PasswordHasher<AppUser>();
modelBuilder.Entity<AppUser>().HasData(
new AppUser
{
Id = 1, // int id veya GUID
FirstName = "Admin",
LastName = "Admin",
ImageUrl = "/SeedData/defaultuser.png",
UserName = "admin",
NormalizedUserName = "ADMIN",
Email = "admin@example.com",
NormalizedEmail = "ADMIN@EXAMPLE.COM",
EmailConfirmed = true,
PasswordHash = hasher.HashPassword(null, "Password123!"),
SecurityStamp = Guid.NewGuid().ToString("D")
}
);
modelBuilder.Entity<AppRole>().HasData(
new AppRole
{
Id = 1, // int id veya GUID
Name = "Admin",
NormalizedName = "ADMIN",
ConcurrencyStamp = Guid.NewGuid().ToString("D")
}
);
modelBuilder.Entity<IdentityUserRole<int>>().HasData(
new IdentityUserRole<int>
{
UserId = 1,
RoleId = 1
}
);
modelBuilder.Entity<CompanyInfoVideo>().HasData(
new CompanyInfoVideo
{
CompanyInfoVideoID = 1,
VideoUrl = "https://www.youtube.com/watch?v=r-thd4PJKBw"
}
);
modelBuilder.Entity<Footer>().HasData(
new Footer
{
FooterID = 1,
Phone = "0999 999 99 99",
Mail = "insaatmimarlik@mimarlik.com",
Facebook = "https://facebook.com",
Instagram = "https://instagram.com",
Linkedin = "https://linkedin.com",
Youtube = "https://youtube.com",
LogoUrl = "/SeedData/Logo.png"
}
);
modelBuilder.Entity<HomeBanner>().HasData(
new HomeBanner
{
HomeBannerID = 1,
Title = "Tasarım & İnşaat",
SubTitle = "150 m2'den başlayan modern enerji tasarruflu evler.",
LogoUrl = "/SeedData/Logo.png"
}
);
modelBuilder.Entity<Project>().HasData(
new Project
{
ProjectID = 1,
CoverUrl = "/SeedData/Project-3.png",
Date = DateOnly.Parse("2025-04-15"),
Title = "Taşevler",
Location = "3119 Mulberry Ln, Newcastle, UK",
ShortDescription = "Eski 2 katlı evi tamamen genişletip yeniden tasarlamak için üç ay boyunca bu proje üzerinde çalıştık.",
IsActive = true,
Slug = "tasevler",
LongDescription = "Autem ipsum nam porro corporis rerum. Quis eos dolorem eos itaque inventore commodi labore quia quia. Exercitationem repudiandae officiis neque suscipit non officia eaque itaque enim. Voluptatem officia accusantium nesciunt est omnis tempora consectetur dignissimos. Sequi nulla at esse enim cum deserunt eius.\r\nAmet consequatur qui dolore veniam voluptatem voluptatem sit. Non aspernatur atque natus ut cum nam et. Praesentium error dolores rerum minus sequi quia veritatis eum. Eos et doloribus doloremque nesciunt molestiae laboriosam.\r\nImpedit ipsum quae et aliquid doloribus et voluptatem quasi. Perspiciatis occaecati earum et magnam animi. Quibusdam non qui ea vitae suscipit vitae sunt. Repudiandae incidunt cumque minus deserunt assumenda tempore. Delectus voluptas necessitatibus est.\r\nSunt voluptatum sapiente facilis quo odio aut ipsum repellat debitis. Molestiae et autem libero. Explicabo et quod necessitatibus similique quis dolor eum. Numquam eaque praesentium rem et qui nesciunt.",
GoogleMapIFrame = "https://www.google.com/maps/embed?pb=!1m13!1m8!1m3!1d50122.87145390096!2d26.7044768!3d38.2637395!3m2!1i1024!2i768!4f13.1!3m2!1m1!2s!5e0!3m2!1str!2str!4v1722545102804!5m2!1str!2str",
VideoUrl = "https://www.youtube.com/watch?v=r-thd4PJKBw",
FloorPlanUrl = "/SeedData/floor-plan.png",
Status = ProjectStatus.Completed
},
new Project
{
ProjectID = 2,
CoverUrl = "/SeedData/Project-2.png",
Date = DateOnly.Parse("2026-02-15"),
Title = "Yatay Mimari",
Location = "2560 Russell st, Boston, MA",
ShortDescription = "2022 yılındaki ilk projelerimizden biri olan bu ev, benzersiz peyzaj tasarım çözümleri ve dış cephe çalışmalarıyla dikkat çekiyor.",
IsActive = true,
Slug = "yataymimari",
LongDescription = "Autem ipsum nam porro corporis rerum. Quis eos dolorem eos itaque inventore commodi labore quia quia. Exercitationem repudiandae officiis neque suscipit non officia eaque itaque enim. Voluptatem officia accusantium nesciunt est omnis tempora consectetur dignissimos. Sequi nulla at esse enim cum deserunt eius.\r\nAmet consequatur qui dolore veniam voluptatem voluptatem sit. Non aspernatur atque natus ut cum nam et. Praesentium error dolores rerum minus sequi quia veritatis eum. Eos et doloribus doloremque nesciunt molestiae laboriosam.\r\nImpedit ipsum quae et aliquid doloribus et voluptatem quasi. Perspiciatis occaecati earum et magnam animi. Quibusdam non qui ea vitae suscipit vitae sunt. Repudiandae incidunt cumque minus deserunt assumenda tempore. Delectus voluptas necessitatibus est.\r\nSunt voluptatum sapiente facilis quo odio aut ipsum repellat debitis. Molestiae et autem libero. Explicabo et quod necessitatibus similique quis dolor eum. Numquam eaque praesentium rem et qui nesciunt.",
GoogleMapIFrame = "https://www.google.com/maps/embed?pb=!1m13!1m8!1m3!1d50122.87145390096!2d26.7044768!3d38.2637395!3m2!1i1024!2i768!4f13.1!3m2!1m1!2s!5e0!3m2!1str!2str!4v1722545102804!5m2!1str!2str",
VideoUrl = "https://www.youtube.com/watch?v=r-thd4PJKBw",
FloorPlanUrl = "/SeedData/floor-plan.png",
Status = ProjectStatus.UnderConstruction
},
new Project
{
ProjectID = 3,
CoverUrl = "/SeedData/Project-1.png",
Date = DateOnly.Parse("2027-01-10"),
Title = "Modern Mimari",
Location = "123 Ave. Boston",
ShortDescription = "2022 yılındaki ilk projelerimizden biri olan bu ev, benzersiz peyzaj tasarım çözümleri ve dış cephe çalışmalarıyla dikkat çekiyor.",
IsActive = true,
Slug = "modernmimari",
LongDescription = "Autem ipsum nam porro corporis rerum. Quis eos dolorem eos itaque inventore commodi labore quia quia. Exercitationem repudiandae officiis neque suscipit non officia eaque itaque enim. Voluptatem officia accusantium nesciunt est omnis tempora consectetur dignissimos. Sequi nulla at esse enim cum deserunt eius.\r\nAmet consequatur qui dolore veniam voluptatem voluptatem sit. Non aspernatur atque natus ut cum nam et. Praesentium error dolores rerum minus sequi quia veritatis eum. Eos et doloribus doloremque nesciunt molestiae laboriosam.\r\nImpedit ipsum quae et aliquid doloribus et voluptatem quasi. Perspiciatis occaecati earum et magnam animi. Quibusdam non qui ea vitae suscipit vitae sunt. Repudiandae incidunt cumque minus deserunt assumenda tempore. Delectus voluptas necessitatibus est.\r\nSunt voluptatum sapiente facilis quo odio aut ipsum repellat debitis. Molestiae et autem libero. Explicabo et quod necessitatibus similique quis dolor eum. Numquam eaque praesentium rem et qui nesciunt.",
GoogleMapIFrame = "https://www.google.com/maps/embed?pb=!1m13!1m8!1m3!1d50122.87145390096!2d26.7044768!3d38.2637395!3m2!1i1024!2i768!4f13.1!3m2!1m1!2s!5e0!3m2!1str!2str!4v1722545102804!5m2!1str!2str",
VideoUrl = "https://www.youtube.com/watch?v=r-thd4PJKBw",
FloorPlanUrl = "/SeedData/floor-plan.png",
Status = ProjectStatus.Planned
}
);
modelBuilder.Entity<Reference>().HasData(
new Reference
{
ReferenceID = 1,
LogoUrl = "/SeedData/Reference-1.png",
WebUrl = "https://google.com"
},
new Reference
{
ReferenceID = 2,
LogoUrl = "/SeedData/Reference-2.png",
WebUrl = "https://google.com"
},
new Reference
{
ReferenceID = 3,
LogoUrl = "/SeedData/Reference-3.png",
WebUrl = "https://google.com"
},
new Reference
{
ReferenceID = 4,
LogoUrl = "/SeedData/Reference-4.png",
WebUrl = "https://google.com"
},
new Reference
{
ReferenceID = 5,
LogoUrl = "/SeedData/Reference-5.png",
WebUrl = "https://google.com"
},
new Reference
{
ReferenceID = 6,
LogoUrl = "/SeedData/Reference-6.png",
WebUrl = "https://google.com"
}
);
modelBuilder.Entity<Service>().HasData(
new Service
{
ServiceID = 1,
Title = "Mimarlık",
SubTitle = "Yüksek kalitede mimarlık hizmetleri sunuyoruz.",
IsActive = true
},
new Service
{
ServiceID = 2,
Title = "İç mekan tasarımı",
SubTitle = "Ekibimiz özgün ve şık mimari çözümler sunmaktadır.",
IsActive = true
},
new Service
{
ServiceID = 3,
Title = "Peyzaj Mimarisi",
SubTitle = "Estetik ve fonksiyonelliği bir araya getiren peyzaj çözümleri üretiyoruz.",
IsActive = true
}
);
modelBuilder.Entity<Slider>().HasData(
new Slider
{
SliderID = 1,
Location = "2750 Duffy St",
Sqm = "200",
PriceInfo = "400.000",
ImageUrl = "/SeedData/Slider-1.png"
},
new Slider
{
SliderID = 2,
Location = "5032 Hewes Ave",
Sqm = "290",
PriceInfo = "490.000",
ImageUrl = "/SeedData/Slider-2.png"
},
new Slider
{
SliderID = 3,
Location = "2239 Wilmar Farm Rd",
Sqm = "350",
PriceInfo = "550.000",
ImageUrl = "/SeedData/Slider-3.png"
}
);
modelBuilder.Entity<Team>().HasData(
new Team
{
TeamID = 1,
NameSurname = "Meryem Sağkut",
Title = "Baş İç Mimar",
ImageUrl = "/SeedData/Team-1.jpg",
Facebook = "https://facebook.com",
Instagram = "https://instagram.com",
Linkedin = "https://linkedin.com"
},
new Team
{
TeamID = 2,
NameSurname = "Can Balamir",
Title = "Kıdemli Mimar",
ImageUrl = "/SeedData/Team-2.jpg",
Facebook = "https://facebook.com",
Instagram = "https://instagram.com",
Linkedin = "https://linkedin.com"
},
new Team
{
TeamID = 3,
NameSurname = "Aslı Sönmez",
Title = "Dış Cephe ve Peyzaj Tasarımcısı",
ImageUrl = "/SeedData/Team-3.jpg",
Facebook = "https://facebook.com",
Instagram = "https://instagram.com",
Linkedin = "https://linkedin.com"
},
new Team
{
TeamID = 4,
NameSurname = "Kübra Mecan",
Title = "Proje Müdürü",
ImageUrl = "/SeedData/Team-4.jpg",
Facebook = "https://facebook.com",
Instagram = "https://instagram.com",
Linkedin = "https://linkedin.com"
}
);
modelBuilder.Entity<Testimonial>().HasData(
new Testimonial
{
TestimonialID = 1,
Name = "Samet Malkın",
Title = "Müşteri",
ImageUrl = "/SeedData/User-1.png",
Comment = "Tasarım ve mimarlık hizmeti veren birçok şirketle çalıştım ve siz bunların arasından gerçekten sıyrılan ve harika bir iş çıkaranlardan birisiniz.",
Status = TestimonialStatus.Confirmed
},
new Testimonial
{
TestimonialID = 2,
Name = "Kübra Yalman",
Title = "Girişimci",
ImageUrl = "/SeedData/User-2.png",
Comment = "Birinci sınıf yaratıcılık ve kaliteli hizmet arıyordum ve ekibinizde aradığımı buldum. Tüm fikirlerimi ve taleplerimi dikkate aldınız ve harika bir proje ortaya çıkardınız.",
Status = TestimonialStatus.Confirmed
}
);
modelBuilder.Entity<WorkProcess>().HasData(
new WorkProcess
{
WorkProcessID = 1,
Info = "Müşteri ile tanışma",
Title = "Hedefleri karşılayın ve tanımlayın",
SubTitle = "Yaptığımız ilk şey müşterilerimizle bir araya gelip gelecekteki bir projedeki hedeflerini konuşmaktır. Bu toplantı sırasında fikirlerinizi iletmekten ve bolca soru sormaktan çekinmeyin. Bu aşama oldukça belirleyicidir çünkü potansiyel mimarınızın çalışmalarını portföylerine göz atarak değerlendirebilirsiniz. Bir müşteri olarak mimarın ihtiyaçlarınızı dinleyip dinlemediğini ve bunları anlayıp anlamadığını da değerlendirebilirsiniz.",
ImageUrl = "/SeedData/WorkProcess-1.png",
IsActive = true
},
new WorkProcess
{
WorkProcessID = 2,
Info = "Proje Konsept Geliştirme",
Title = "Konsept Üzerinde Çalışma",
SubTitle = "İşbirliğimizin bir sonraki adımı, gelecekteki evinizin konseptini geliştirmektir. Evinizin inşaat sürecini başarılı kılan her bir faktörü tanımlamamıza yardımcı olur. Tasarımcı ve mimar ekibimiz, nihai sonucun yalnızca gereksinimlerinizi değil aynı zamanda uluslararası inşaat ve güvenlik standartlarını da karşılamasını sağlamak için projenin her bir adımını planlamalıdır. İzleme ve kontrol bu noktada başlar.",
ImageUrl = "/SeedData/WorkProcess-2.png",
IsActive = true
},
new WorkProcess
{
WorkProcessID = 3,
Info = "İç ve Dış Mekanda Çalışma",
Title = "Evinizi İnşa Etme",
SubTitle = "Bir ev inşa etmenin en önemli ve sorumlu kısmının inşaat süreci olduğuna şüphe yok. Güvenilir müteahhitlerle çalıştığımız için harika bir sonuç garantilidir. Bu aşama, inşaat alanını hazırlamaktan izolasyonu kurmaya ve alçıpanı tamamlamaya ve dış cephede çalışmaya kadar kontrol edilmesi gereken çeşitli görevleri içerdiğinden en karmaşık olanlardan biridir.",
ImageUrl = "/SeedData/WorkProcess-3.png",
IsActive = true
},
new WorkProcess
{
WorkProcessID = 4,
Info = "Gelecekteki eviniz için son rötuşlar",
Title = "Projenin Tamamlanması",
SubTitle = "Proje son aşamasına geldiğinde, kalite kontrol ekibimiz her şeyin doğru şekilde yapıldığından emin olmak için binanın son kontrolünü gerçekleştirir. Çalışanlarımız ayrıca bu son adımda tüm iç elemanların ve armatürlerin doğru şekilde monte edildiğinden emin olacaktır. Her şey tamamlandıktan sonra, müşterimizi nihai sonucu değerlendirmeye ve projemizin kaliteli performansını deneyimlemeye davet ediyoruz.",
ImageUrl = "/SeedData/WorkProcess-4.png",
IsActive = true
}
);
}
}
}

View File

@@ -0,0 +1,16 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
namespace ConstructorApp.DataAccessLayer.Concrete
{
public class ConstructorContextFactory : IDesignTimeDbContextFactory<ConstructorContext>
{
public ConstructorContext CreateDbContext(string[] args)
{
var optionsBuilder = new DbContextOptionsBuilder<ConstructorContext>();
optionsBuilder.UseSqlServer("Server=SABI\\SQLEXPRESS;Initial Catalog=CONSTRUCTOR;User ID=sa;Password=13579spP!!!!;Connect Timeout=30;Encrypt=False;TrustServerCertificate=True");
return new ConstructorContext(optionsBuilder.Options);
}
}
}

View File

@@ -0,0 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Identity" Version="2.3.1" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ConstructorApp.EntityLayer\ConstructorApp.EntityLayer.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,14 @@
using ConstructorApp.DataAccessLayer.Abstract;
using ConstructorApp.DataAccessLayer.Concrete;
using ConstructorApp.DataAccessLayer.Repositories;
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.DataAccessLayer.EntityFramework
{
public class EfCompanyInfoDal : GenericRepository<CompanyInfo>, ICompanyInfoDal
{
public EfCompanyInfoDal(ConstructorContext context) : base(context)
{
}
}
}

View File

@@ -0,0 +1,14 @@
using ConstructorApp.DataAccessLayer.Abstract;
using ConstructorApp.DataAccessLayer.Concrete;
using ConstructorApp.DataAccessLayer.Repositories;
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.DataAccessLayer.EntityFramework
{
public class EfCompanyInfoVideoDal : GenericRepository<CompanyInfoVideo>, ICompanyInfoVideoDal
{
public EfCompanyInfoVideoDal(ConstructorContext context) : base(context)
{
}
}
}

View File

@@ -0,0 +1,34 @@
using ConstructorApp.DataAccessLayer.Abstract;
using ConstructorApp.DataAccessLayer.Concrete;
using ConstructorApp.DataAccessLayer.Repositories;
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.DataAccessLayer.EntityFramework
{
public class EfContactUsDal : GenericRepository<ContactUs>, IContactUsDal
{
private readonly ConstructorContext context;
public EfContactUsDal(ConstructorContext context) : base(context)
{
this.context = context;
}
public int CountAll()
{
return context.ContactUs.Count();
}
public int CountByStatusPending()
{
return context.ContactUs.Where(x => x.Status == false).Count();
}
public void MarkAsRead(int id)
{
var values = context.ContactUs.Find(id);
values.Status = true;
context.SaveChanges();
}
}
}

View File

@@ -0,0 +1,21 @@
using ConstructorApp.DataAccessLayer.Abstract;
using ConstructorApp.DataAccessLayer.Concrete;
using ConstructorApp.DataAccessLayer.Repositories;
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.DataAccessLayer.EntityFramework
{
public class EfFooterDal : GenericRepository<Footer>, IFooterDal
{
private readonly ConstructorContext _context;
public EfFooterDal(ConstructorContext context) : base(context)
{
_context = context;
}
public Footer GetFooterDetails()
{
return _context.Footer.FirstOrDefault();
}
}
}

View File

@@ -0,0 +1,14 @@
using ConstructorApp.DataAccessLayer.Abstract;
using ConstructorApp.DataAccessLayer.Concrete;
using ConstructorApp.DataAccessLayer.Repositories;
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.DataAccessLayer.EntityFramework
{
public class EfHomeBannerDal : GenericRepository<HomeBanner>, IHomeBannerDal
{
public EfHomeBannerDal(ConstructorContext context) : base(context)
{
}
}
}

View File

@@ -0,0 +1,48 @@
using ConstructorApp.DataAccessLayer.Abstract;
using ConstructorApp.DataAccessLayer.Concrete;
using ConstructorApp.DataAccessLayer.Repositories;
using ConstructorApp.EntityLayer.Entities;
using Microsoft.EntityFrameworkCore;
namespace ConstructorApp.DataAccessLayer.EntityFramework
{
public class EfProjectDal : GenericRepository<Project>, IProjectDal
{
private readonly ConstructorContext context;
public EfProjectDal(ConstructorContext context) : base(context)
{
this.context = context;
}
public int CountAll()
{
return context.Projects.Count(x => x.IsActive == true);
}
public Project GetBySlug(string slug)
{
return context.Projects.FirstOrDefault(p => p.Slug == slug && p.IsActive);
}
public Project GetProjectWithImagesBySlug(string slug)
{
return context.Projects
.Include(p => p.ProjectGallery)
.FirstOrDefault(p => p.Slug == slug);
}
public void ProjectStatusActive(int id)
{
var values = context.Projects.Find(id);
values.IsActive = true;
context.SaveChanges();
}
public void rojectStatusPassive(int id)
{
var values = context.Projects.Find(id);
values.IsActive = false;
context.SaveChanges();
}
}
}

View File

@@ -0,0 +1,23 @@
using ConstructorApp.DataAccessLayer.Abstract;
using ConstructorApp.DataAccessLayer.Concrete;
using ConstructorApp.DataAccessLayer.Repositories;
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.DataAccessLayer.EntityFramework
{
public class EfProjectGalleryDal : GenericRepository<ProjectGallery>, IProjectGalleryDal
{
private readonly ConstructorContext context;
public EfProjectGalleryDal(ConstructorContext context) : base(context)
{
this.context = context;
}
public List<ProjectGallery> GetImagesByProjectId(int projectId)
{
return context.ProjectGallery
.Where(x => x.ProjectID == projectId)
.ToList();
}
}
}

View File

@@ -0,0 +1,21 @@
using ConstructorApp.DataAccessLayer.Abstract;
using ConstructorApp.DataAccessLayer.Concrete;
using ConstructorApp.DataAccessLayer.Repositories;
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.DataAccessLayer.EntityFramework
{
public class EfReferenceDal : GenericRepository<Reference>, IReferenceDal
{
private readonly ConstructorContext context;
public EfReferenceDal(ConstructorContext context) : base(context)
{
this.context = context;
}
public int CountAll()
{
return context.References.Count();
}
}
}

View File

@@ -0,0 +1,30 @@
using ConstructorApp.DataAccessLayer.Abstract;
using ConstructorApp.DataAccessLayer.Concrete;
using ConstructorApp.DataAccessLayer.Repositories;
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.DataAccessLayer.EntityFramework
{
public class EfServiceDal : GenericRepository<Service>, IServiceDal
{
private readonly ConstructorContext context;
public EfServiceDal(ConstructorContext context) : base(context)
{
this.context = context;
}
public void ServiceStatusActive(int id)
{
var values = context.Services.Find(id);
values.IsActive = true;
context.SaveChanges();
}
public void ServiceStatusPassive(int id)
{
var values = context.Services.Find(id);
values.IsActive = false;
context.SaveChanges();
}
}
}

View File

@@ -0,0 +1,14 @@
using ConstructorApp.DataAccessLayer.Abstract;
using ConstructorApp.DataAccessLayer.Concrete;
using ConstructorApp.DataAccessLayer.Repositories;
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.DataAccessLayer.EntityFramework
{
public class EfSliderDal : GenericRepository<Slider>, ISliderDal
{
public EfSliderDal(ConstructorContext context) : base(context)
{
}
}
}

View File

@@ -0,0 +1,14 @@
using ConstructorApp.DataAccessLayer.Abstract;
using ConstructorApp.DataAccessLayer.Concrete;
using ConstructorApp.DataAccessLayer.Repositories;
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.DataAccessLayer.EntityFramework
{
public class EfTeamDal : GenericRepository<Team>, ITeamDal
{
public EfTeamDal(ConstructorContext context) : base(context)
{
}
}
}

View File

@@ -0,0 +1,35 @@
using ConstructorApp.DataAccessLayer.Abstract;
using ConstructorApp.DataAccessLayer.Concrete;
using ConstructorApp.DataAccessLayer.Repositories;
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.DataAccessLayer.EntityFramework
{
public class EfTestimonialDal : GenericRepository<Testimonial>, ITestimonialDal
{
private readonly ConstructorContext context;
public EfTestimonialDal(ConstructorContext context) : base(context)
{
this.context = context;
}
public int CountAll()
{
return context.Testimonials.Count(x => x.Status != TestimonialStatus.Cancelled);
}
public void TestimonialStatusActive(int id)
{
var values = context.Testimonials.Find(id);
values.Status = TestimonialStatus.Confirmed;
context.SaveChanges();
}
public void TestimonialStatusPassive(int id)
{
var values = context.Testimonials.Find(id);
values.Status = TestimonialStatus.Cancelled;
context.SaveChanges();
}
}
}

View File

@@ -0,0 +1,30 @@
using ConstructorApp.DataAccessLayer.Abstract;
using ConstructorApp.DataAccessLayer.Concrete;
using ConstructorApp.DataAccessLayer.Repositories;
using ConstructorApp.EntityLayer.Entities;
namespace ConstructorApp.DataAccessLayer.EntityFramework
{
public class EfWorkProcessDal : GenericRepository<WorkProcess>, IWorkProcessDal
{
private readonly ConstructorContext context;
public EfWorkProcessDal(ConstructorContext context) : base(context)
{
this.context = context;
}
public void ServiceStatusActive(int id)
{
var values = context.WorkProcess.Find(id);
values.IsActive = true;
context.SaveChanges();
}
public void ServiceStatusPassive(int id)
{
var values = context.WorkProcess.Find(id);
values.IsActive = false;
context.SaveChanges();
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,611 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
namespace ConstructorApp.DataAccessLayer.Migrations
{
/// <inheritdoc />
public partial class InitialCreate : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "AspNetRoles",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Name = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
NormalizedName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(max)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AspNetRoles", x => x.Id);
});
migrationBuilder.CreateTable(
name: "AspNetUsers",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
FirstName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
LastName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
ImageUrl = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
ConfirmCode = table.Column<int>(type: "int", nullable: false),
UserName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
NormalizedUserName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
Email = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
NormalizedEmail = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
EmailConfirmed = table.Column<bool>(type: "bit", nullable: false),
PasswordHash = table.Column<string>(type: "nvarchar(max)", nullable: true),
SecurityStamp = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(max)", nullable: true),
PhoneNumber = table.Column<string>(type: "nvarchar(max)", nullable: true),
PhoneNumberConfirmed = table.Column<bool>(type: "bit", nullable: false),
TwoFactorEnabled = table.Column<bool>(type: "bit", nullable: false),
LockoutEnd = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
LockoutEnabled = table.Column<bool>(type: "bit", nullable: false),
AccessFailedCount = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_AspNetUsers", x => x.Id);
});
migrationBuilder.CreateTable(
name: "CompanyInfo",
columns: table => new
{
CompanyInfoID = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Value = table.Column<string>(type: "nvarchar(3)", maxLength: 3, nullable: false),
Title = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false),
SubTitle = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CompanyInfo", x => x.CompanyInfoID);
});
migrationBuilder.CreateTable(
name: "CompanyInfoVideo",
columns: table => new
{
CompanyInfoVideoID = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
VideoUrl = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CompanyInfoVideo", x => x.CompanyInfoVideoID);
});
migrationBuilder.CreateTable(
name: "ContactUs",
columns: table => new
{
ContactusID = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Date = table.Column<DateTime>(type: "datetime2", nullable: false),
NameSurname = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
Mail = table.Column<string>(type: "nvarchar(max)", nullable: false),
Phone = table.Column<string>(type: "nvarchar(max)", nullable: false),
MessageContent = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: false),
Status = table.Column<bool>(type: "bit", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ContactUs", x => x.ContactusID);
});
migrationBuilder.CreateTable(
name: "Footer",
columns: table => new
{
FooterID = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
LogoUrl = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
Phone = table.Column<string>(type: "nvarchar(14)", maxLength: 14, nullable: true),
Mail = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
Facebook = table.Column<string>(type: "nvarchar(max)", nullable: true),
Instagram = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
Linkedin = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
Youtube = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Footer", x => x.FooterID);
});
migrationBuilder.CreateTable(
name: "HomeBanners",
columns: table => new
{
HomeBannerID = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Title = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
SubTitle = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
LogoUrl = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_HomeBanners", x => x.HomeBannerID);
});
migrationBuilder.CreateTable(
name: "Projects",
columns: table => new
{
ProjectID = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
CoverUrl = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
Date = table.Column<DateOnly>(type: "date", nullable: false),
Title = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
Location = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
ShortDescription = table.Column<string>(type: "nvarchar(300)", maxLength: 300, nullable: true),
LongDescription = table.Column<string>(type: "nvarchar(max)", nullable: true),
IsActive = table.Column<bool>(type: "bit", nullable: false),
Slug = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
GoogleMapIFrame = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: false),
VideoUrl = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
FloorPlanUrl = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
Status = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Projects", x => x.ProjectID);
});
migrationBuilder.CreateTable(
name: "References",
columns: table => new
{
ReferenceID = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
LogoUrl = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
WebUrl = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_References", x => x.ReferenceID);
});
migrationBuilder.CreateTable(
name: "Services",
columns: table => new
{
ServiceID = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Title = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
SubTitle = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
IsActive = table.Column<bool>(type: "bit", maxLength: 100, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Services", x => x.ServiceID);
});
migrationBuilder.CreateTable(
name: "Sliders",
columns: table => new
{
SliderID = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Location = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
Sqm = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
PriceInfo = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
ImageUrl = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Sliders", x => x.SliderID);
});
migrationBuilder.CreateTable(
name: "Teams",
columns: table => new
{
TeamID = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
NameSurname = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
Title = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
ImageUrl = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
Facebook = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
Instagram = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
Linkedin = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Teams", x => x.TeamID);
});
migrationBuilder.CreateTable(
name: "Testimonials",
columns: table => new
{
TestimonialID = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Name = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
Title = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
Comment = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: false),
ImageUrl = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
Status = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Testimonials", x => x.TestimonialID);
});
migrationBuilder.CreateTable(
name: "WorkProcess",
columns: table => new
{
WorkProcessID = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Info = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
Title = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
SubTitle = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: false),
ImageUrl = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
IsActive = table.Column<bool>(type: "bit", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_WorkProcess", x => x.WorkProcessID);
});
migrationBuilder.CreateTable(
name: "AspNetRoleClaims",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
RoleId = table.Column<int>(type: "int", nullable: false),
ClaimType = table.Column<string>(type: "nvarchar(max)", nullable: true),
ClaimValue = table.Column<string>(type: "nvarchar(max)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AspNetRoleClaims", x => x.Id);
table.ForeignKey(
name: "FK_AspNetRoleClaims_AspNetRoles_RoleId",
column: x => x.RoleId,
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "AspNetUserClaims",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
UserId = table.Column<int>(type: "int", nullable: false),
ClaimType = table.Column<string>(type: "nvarchar(max)", nullable: true),
ClaimValue = table.Column<string>(type: "nvarchar(max)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AspNetUserClaims", x => x.Id);
table.ForeignKey(
name: "FK_AspNetUserClaims_AspNetUsers_UserId",
column: x => x.UserId,
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "AspNetUserLogins",
columns: table => new
{
LoginProvider = table.Column<string>(type: "nvarchar(450)", nullable: false),
ProviderKey = table.Column<string>(type: "nvarchar(450)", nullable: false),
ProviderDisplayName = table.Column<string>(type: "nvarchar(max)", nullable: true),
UserId = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_AspNetUserLogins", x => new { x.LoginProvider, x.ProviderKey });
table.ForeignKey(
name: "FK_AspNetUserLogins_AspNetUsers_UserId",
column: x => x.UserId,
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "AspNetUserRoles",
columns: table => new
{
UserId = table.Column<int>(type: "int", nullable: false),
RoleId = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_AspNetUserRoles", x => new { x.UserId, x.RoleId });
table.ForeignKey(
name: "FK_AspNetUserRoles_AspNetRoles_RoleId",
column: x => x.RoleId,
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_AspNetUserRoles_AspNetUsers_UserId",
column: x => x.UserId,
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "AspNetUserTokens",
columns: table => new
{
UserId = table.Column<int>(type: "int", nullable: false),
LoginProvider = table.Column<string>(type: "nvarchar(450)", nullable: false),
Name = table.Column<string>(type: "nvarchar(450)", nullable: false),
Value = table.Column<string>(type: "nvarchar(max)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AspNetUserTokens", x => new { x.UserId, x.LoginProvider, x.Name });
table.ForeignKey(
name: "FK_AspNetUserTokens_AspNetUsers_UserId",
column: x => x.UserId,
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ProjectGallery",
columns: table => new
{
ProjectGalleryID = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
ImageUrl = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
ProjectID = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ProjectGallery", x => x.ProjectGalleryID);
table.ForeignKey(
name: "FK_ProjectGallery_Projects_ProjectID",
column: x => x.ProjectID,
principalTable: "Projects",
principalColumn: "ProjectID",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.InsertData(
table: "AspNetRoles",
columns: new[] { "Id", "ConcurrencyStamp", "Name", "NormalizedName" },
values: new object[] { 1, "3abf73f8-a18f-4452-9c3f-d8abf48c18c5", "Admin", "ADMIN" });
migrationBuilder.InsertData(
table: "AspNetUsers",
columns: new[] { "Id", "AccessFailedCount", "ConcurrencyStamp", "ConfirmCode", "Email", "EmailConfirmed", "FirstName", "ImageUrl", "LastName", "LockoutEnabled", "LockoutEnd", "NormalizedEmail", "NormalizedUserName", "PasswordHash", "PhoneNumber", "PhoneNumberConfirmed", "SecurityStamp", "TwoFactorEnabled", "UserName" },
values: new object[] { 1, 0, "b899157c-b38b-43f9-8fdf-f04d21a0370c", 0, "admin@example.com", true, "Admin", "/SeedData/defaultuser.png", "Admin", false, null, "ADMIN@EXAMPLE.COM", "ADMIN", "AQAAAAIAAYagAAAAEDNJ/hC+Ey7MpD2q6eaGnJn6CQmUyNUgiZiUCdHqiAhGJsnhm+Q3VY+xhEZALFzeOA==", null, false, "6d0581e4-af84-4438-aa89-17362a9302f4", false, "admin" });
migrationBuilder.InsertData(
table: "CompanyInfo",
columns: new[] { "CompanyInfoID", "SubTitle", "Title", "Value" },
values: new object[,]
{
{ 1, "2011 yılından bu yana sektörde faaliyet göstermekteyiz.", "YIL", "7" },
{ 2, "Bugüne kadar 54 adet konut projesi tasarladık.", "PROJE", "54" },
{ 3, "Şirketimiz yaratıcılığı nedeniyle birçok kez ödüle layık görüldü.", "ÖDÜL", "11" }
});
migrationBuilder.InsertData(
table: "CompanyInfoVideo",
columns: new[] { "CompanyInfoVideoID", "VideoUrl" },
values: new object[] { 1, "https://www.youtube.com/watch?v=r-thd4PJKBw" });
migrationBuilder.InsertData(
table: "Footer",
columns: new[] { "FooterID", "Facebook", "Instagram", "Linkedin", "LogoUrl", "Mail", "Phone", "Youtube" },
values: new object[] { 1, "https://facebook.com", "https://instagram.com", "https://linkedin.com", "/SeedData/Logo.png", "insaatmimarlik@mimarlik.com", "0999 999 99 99", "https://youtube.com" });
migrationBuilder.InsertData(
table: "HomeBanners",
columns: new[] { "HomeBannerID", "LogoUrl", "SubTitle", "Title" },
values: new object[] { 1, "/SeedData/Logo.png", "150 m2'den başlayan modern enerji tasarruflu evler.", "Tasarım & İnşaat" });
migrationBuilder.InsertData(
table: "Projects",
columns: new[] { "ProjectID", "CoverUrl", "Date", "FloorPlanUrl", "GoogleMapIFrame", "IsActive", "Location", "LongDescription", "ShortDescription", "Slug", "Status", "Title", "VideoUrl" },
values: new object[,]
{
{ 1, "/SeedData/Project-3.png", new DateOnly(2025, 4, 15), "/SeedData/floor-plan.png", "https://www.google.com/maps/embed?pb=!1m13!1m8!1m3!1d50122.87145390096!2d26.7044768!3d38.2637395!3m2!1i1024!2i768!4f13.1!3m2!1m1!2s!5e0!3m2!1str!2str!4v1722545102804!5m2!1str!2str", true, "3119 Mulberry Ln, Newcastle, UK", "Autem ipsum nam porro corporis rerum. Quis eos dolorem eos itaque inventore commodi labore quia quia. Exercitationem repudiandae officiis neque suscipit non officia eaque itaque enim. Voluptatem officia accusantium nesciunt est omnis tempora consectetur dignissimos. Sequi nulla at esse enim cum deserunt eius.\r\nAmet consequatur qui dolore veniam voluptatem voluptatem sit. Non aspernatur atque natus ut cum nam et. Praesentium error dolores rerum minus sequi quia veritatis eum. Eos et doloribus doloremque nesciunt molestiae laboriosam.\r\nImpedit ipsum quae et aliquid doloribus et voluptatem quasi. Perspiciatis occaecati earum et magnam animi. Quibusdam non qui ea vitae suscipit vitae sunt. Repudiandae incidunt cumque minus deserunt assumenda tempore. Delectus voluptas necessitatibus est.\r\nSunt voluptatum sapiente facilis quo odio aut ipsum repellat debitis. Molestiae et autem libero. Explicabo et quod necessitatibus similique quis dolor eum. Numquam eaque praesentium rem et qui nesciunt.", "Eski 2 katlı evi tamamen genişletip yeniden tasarlamak için üç ay boyunca bu proje üzerinde çalıştık.", "tasevler", 2, "Taşevler", "https://www.youtube.com/watch?v=r-thd4PJKBw" },
{ 2, "/SeedData/Project-2.png", new DateOnly(2026, 2, 15), "/SeedData/floor-plan.png", "https://www.google.com/maps/embed?pb=!1m13!1m8!1m3!1d50122.87145390096!2d26.7044768!3d38.2637395!3m2!1i1024!2i768!4f13.1!3m2!1m1!2s!5e0!3m2!1str!2str!4v1722545102804!5m2!1str!2str", true, "2560 Russell st, Boston, MA", "Autem ipsum nam porro corporis rerum. Quis eos dolorem eos itaque inventore commodi labore quia quia. Exercitationem repudiandae officiis neque suscipit non officia eaque itaque enim. Voluptatem officia accusantium nesciunt est omnis tempora consectetur dignissimos. Sequi nulla at esse enim cum deserunt eius.\r\nAmet consequatur qui dolore veniam voluptatem voluptatem sit. Non aspernatur atque natus ut cum nam et. Praesentium error dolores rerum minus sequi quia veritatis eum. Eos et doloribus doloremque nesciunt molestiae laboriosam.\r\nImpedit ipsum quae et aliquid doloribus et voluptatem quasi. Perspiciatis occaecati earum et magnam animi. Quibusdam non qui ea vitae suscipit vitae sunt. Repudiandae incidunt cumque minus deserunt assumenda tempore. Delectus voluptas necessitatibus est.\r\nSunt voluptatum sapiente facilis quo odio aut ipsum repellat debitis. Molestiae et autem libero. Explicabo et quod necessitatibus similique quis dolor eum. Numquam eaque praesentium rem et qui nesciunt.", "2022 yılındaki ilk projelerimizden biri olan bu ev, benzersiz peyzaj tasarım çözümleri ve dış cephe çalışmalarıyla dikkat çekiyor.", "yataymimari", 1, "Yatay Mimari", "https://www.youtube.com/watch?v=r-thd4PJKBw" },
{ 3, "/SeedData/Project-1.png", new DateOnly(2027, 1, 10), "/SeedData/floor-plan.png", "https://www.google.com/maps/embed?pb=!1m13!1m8!1m3!1d50122.87145390096!2d26.7044768!3d38.2637395!3m2!1i1024!2i768!4f13.1!3m2!1m1!2s!5e0!3m2!1str!2str!4v1722545102804!5m2!1str!2str", true, "123 Ave. Boston", "Autem ipsum nam porro corporis rerum. Quis eos dolorem eos itaque inventore commodi labore quia quia. Exercitationem repudiandae officiis neque suscipit non officia eaque itaque enim. Voluptatem officia accusantium nesciunt est omnis tempora consectetur dignissimos. Sequi nulla at esse enim cum deserunt eius.\r\nAmet consequatur qui dolore veniam voluptatem voluptatem sit. Non aspernatur atque natus ut cum nam et. Praesentium error dolores rerum minus sequi quia veritatis eum. Eos et doloribus doloremque nesciunt molestiae laboriosam.\r\nImpedit ipsum quae et aliquid doloribus et voluptatem quasi. Perspiciatis occaecati earum et magnam animi. Quibusdam non qui ea vitae suscipit vitae sunt. Repudiandae incidunt cumque minus deserunt assumenda tempore. Delectus voluptas necessitatibus est.\r\nSunt voluptatum sapiente facilis quo odio aut ipsum repellat debitis. Molestiae et autem libero. Explicabo et quod necessitatibus similique quis dolor eum. Numquam eaque praesentium rem et qui nesciunt.", "2022 yılındaki ilk projelerimizden biri olan bu ev, benzersiz peyzaj tasarım çözümleri ve dış cephe çalışmalarıyla dikkat çekiyor.", "modernmimari", 0, "Modern Mimari", "https://www.youtube.com/watch?v=r-thd4PJKBw" }
});
migrationBuilder.InsertData(
table: "References",
columns: new[] { "ReferenceID", "LogoUrl", "WebUrl" },
values: new object[,]
{
{ 1, "/SeedData/Reference-1.png", "https://google.com" },
{ 2, "/SeedData/Reference-2.png", "https://google.com" },
{ 3, "/SeedData/Reference-3.png", "https://google.com" },
{ 4, "/SeedData/Reference-4.png", "https://google.com" },
{ 5, "/SeedData/Reference-5.png", "https://google.com" },
{ 6, "/SeedData/Reference-6.png", "https://google.com" }
});
migrationBuilder.InsertData(
table: "Services",
columns: new[] { "ServiceID", "IsActive", "SubTitle", "Title" },
values: new object[,]
{
{ 1, true, "Yüksek kalitede mimarlık hizmetleri sunuyoruz.", "Mimarlık" },
{ 2, true, "Ekibimiz özgün ve şık mimari çözümler sunmaktadır.", "İç mekan tasarımı" },
{ 3, true, "Estetik ve fonksiyonelliği bir araya getiren peyzaj çözümleri üretiyoruz.", "Peyzaj Mimarisi" }
});
migrationBuilder.InsertData(
table: "Sliders",
columns: new[] { "SliderID", "ImageUrl", "Location", "PriceInfo", "Sqm" },
values: new object[,]
{
{ 1, "/SeedData/Slider-1.png", "2750 Duffy St", "400.000", "200" },
{ 2, "/SeedData/Slider-2.png", "5032 Hewes Ave", "490.000", "290" },
{ 3, "/SeedData/Slider-3.png", "2239 Wilmar Farm Rd", "550.000", "350" }
});
migrationBuilder.InsertData(
table: "Teams",
columns: new[] { "TeamID", "Facebook", "ImageUrl", "Instagram", "Linkedin", "NameSurname", "Title" },
values: new object[,]
{
{ 1, "https://facebook.com", "/SeedData/Team-1.jpg", "https://instagram.com", "https://linkedin.com", "Meryem Sağkut", "Baş İç Mimar" },
{ 2, "https://facebook.com", "/SeedData/Team-2.jpg", "https://instagram.com", "https://linkedin.com", "Can Balamir", "Kıdemli Mimar" },
{ 3, "https://facebook.com", "/SeedData/Team-3.jpg", "https://instagram.com", "https://linkedin.com", "Aslı Sönmez", "Dış Cephe ve Peyzaj Tasarımcısı" },
{ 4, "https://facebook.com", "/SeedData/Team-4.jpg", "https://instagram.com", "https://linkedin.com", "Kübra Mecan", "Proje Müdürü" }
});
migrationBuilder.InsertData(
table: "Testimonials",
columns: new[] { "TestimonialID", "Comment", "ImageUrl", "Name", "Status", "Title" },
values: new object[,]
{
{ 1, "Tasarım ve mimarlık hizmeti veren birçok şirketle çalıştım ve siz bunların arasından gerçekten sıyrılan ve harika bir iş çıkaranlardan birisiniz.", "/SeedData/User-1.png", "Samet Malkın", 1, "Müşteri" },
{ 2, "Birinci sınıf yaratıcılık ve kaliteli hizmet arıyordum ve ekibinizde aradığımı buldum. Tüm fikirlerimi ve taleplerimi dikkate aldınız ve harika bir proje ortaya çıkardınız.", "/SeedData/User-2.png", "Kübra Yalman", 1, "Girişimci" }
});
migrationBuilder.InsertData(
table: "WorkProcess",
columns: new[] { "WorkProcessID", "ImageUrl", "Info", "IsActive", "SubTitle", "Title" },
values: new object[,]
{
{ 1, "/SeedData/WorkProcess-1.png", "Müşteri ile tanışma", true, "Yaptığımız ilk şey müşterilerimizle bir araya gelip gelecekteki bir projedeki hedeflerini konuşmaktır. Bu toplantı sırasında fikirlerinizi iletmekten ve bolca soru sormaktan çekinmeyin. Bu aşama oldukça belirleyicidir çünkü potansiyel mimarınızın çalışmalarını portföylerine göz atarak değerlendirebilirsiniz. Bir müşteri olarak mimarın ihtiyaçlarınızı dinleyip dinlemediğini ve bunları anlayıp anlamadığını da değerlendirebilirsiniz.", "Hedefleri karşılayın ve tanımlayın" },
{ 2, "/SeedData/WorkProcess-2.png", "Proje Konsept Geliştirme", true, "İşbirliğimizin bir sonraki adımı, gelecekteki evinizin konseptini geliştirmektir. Evinizin inşaat sürecini başarılı kılan her bir faktörü tanımlamamıza yardımcı olur. Tasarımcı ve mimar ekibimiz, nihai sonucun yalnızca gereksinimlerinizi değil aynı zamanda uluslararası inşaat ve güvenlik standartlarını da karşılamasını sağlamak için projenin her bir adımını planlamalıdır. İzleme ve kontrol bu noktada başlar.", "Konsept Üzerinde Çalışma" },
{ 3, "/SeedData/WorkProcess-3.png", "İç ve Dış Mekanda Çalışma", true, "Bir ev inşa etmenin en önemli ve sorumlu kısmının inşaat süreci olduğuna şüphe yok. Güvenilir müteahhitlerle çalıştığımız için harika bir sonuç garantilidir. Bu aşama, inşaat alanını hazırlamaktan izolasyonu kurmaya ve alçıpanı tamamlamaya ve dış cephede çalışmaya kadar kontrol edilmesi gereken çeşitli görevleri içerdiğinden en karmaşık olanlardan biridir.", "Evinizi İnşa Etme" },
{ 4, "/SeedData/WorkProcess-4.png", "Gelecekteki eviniz için son rötuşlar", true, "Proje son aşamasına geldiğinde, kalite kontrol ekibimiz her şeyin doğru şekilde yapıldığından emin olmak için binanın son kontrolünü gerçekleştirir. Çalışanlarımız ayrıca bu son adımda tüm iç elemanların ve armatürlerin doğru şekilde monte edildiğinden emin olacaktır. Her şey tamamlandıktan sonra, müşterimizi nihai sonucu değerlendirmeye ve projemizin kaliteli performansını deneyimlemeye davet ediyoruz.", "Projenin Tamamlanması" }
});
migrationBuilder.InsertData(
table: "AspNetUserRoles",
columns: new[] { "RoleId", "UserId" },
values: new object[] { 1, 1 });
migrationBuilder.CreateIndex(
name: "IX_AspNetRoleClaims_RoleId",
table: "AspNetRoleClaims",
column: "RoleId");
migrationBuilder.CreateIndex(
name: "RoleNameIndex",
table: "AspNetRoles",
column: "NormalizedName",
unique: true,
filter: "[NormalizedName] IS NOT NULL");
migrationBuilder.CreateIndex(
name: "IX_AspNetUserClaims_UserId",
table: "AspNetUserClaims",
column: "UserId");
migrationBuilder.CreateIndex(
name: "IX_AspNetUserLogins_UserId",
table: "AspNetUserLogins",
column: "UserId");
migrationBuilder.CreateIndex(
name: "IX_AspNetUserRoles_RoleId",
table: "AspNetUserRoles",
column: "RoleId");
migrationBuilder.CreateIndex(
name: "EmailIndex",
table: "AspNetUsers",
column: "NormalizedEmail");
migrationBuilder.CreateIndex(
name: "UserNameIndex",
table: "AspNetUsers",
column: "NormalizedUserName",
unique: true,
filter: "[NormalizedUserName] IS NOT NULL");
migrationBuilder.CreateIndex(
name: "IX_ProjectGallery_ProjectID",
table: "ProjectGallery",
column: "ProjectID");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "AspNetRoleClaims");
migrationBuilder.DropTable(
name: "AspNetUserClaims");
migrationBuilder.DropTable(
name: "AspNetUserLogins");
migrationBuilder.DropTable(
name: "AspNetUserRoles");
migrationBuilder.DropTable(
name: "AspNetUserTokens");
migrationBuilder.DropTable(
name: "CompanyInfo");
migrationBuilder.DropTable(
name: "CompanyInfoVideo");
migrationBuilder.DropTable(
name: "ContactUs");
migrationBuilder.DropTable(
name: "Footer");
migrationBuilder.DropTable(
name: "HomeBanners");
migrationBuilder.DropTable(
name: "ProjectGallery");
migrationBuilder.DropTable(
name: "References");
migrationBuilder.DropTable(
name: "Services");
migrationBuilder.DropTable(
name: "Sliders");
migrationBuilder.DropTable(
name: "Teams");
migrationBuilder.DropTable(
name: "Testimonials");
migrationBuilder.DropTable(
name: "WorkProcess");
migrationBuilder.DropTable(
name: "AspNetRoles");
migrationBuilder.DropTable(
name: "AspNetUsers");
migrationBuilder.DropTable(
name: "Projects");
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,49 @@
using ConstructorApp.DataAccessLayer.Abstract;
using ConstructorApp.DataAccessLayer.Concrete;
using Microsoft.EntityFrameworkCore;
namespace ConstructorApp.DataAccessLayer.Repositories
{
public class GenericRepository<T> : IGenericDal<T> where T : class
{
private readonly ConstructorContext _context;
public GenericRepository(ConstructorContext context)
{
_context = context;
}
public void Add(T entity)
{
_context.Add(entity);
_context.SaveChanges();
}
public void Delete(T entity)
{
_context.Remove(entity);
_context.SaveChanges();
}
public T GetByID(int id)
{
return _context.Set<T>().Find(id);
}
public List<T> GetListAll()
{
return _context.Set<T>().ToList();
}
public async Task<List<T>> GetListAllAsync()
{
return await _context.Set<T>().ToListAsync();
}
public void Update(T entity)
{
_context.Update(entity);
_context.SaveChanges();
}
}
}

View File

@@ -0,0 +1,20 @@
using System.ComponentModel.DataAnnotations;
namespace ConstructorApp.DtoLayer.AppUserDto
{
public class AppUserEditDto
{
public string? UserName { get; set; }
[Required(ErrorMessage = "Mevcut şifre alanı zorunludur.")]
[Display(Name = "Mevcut Şifre")]
public string? CurrentPassword { get; set; } // Bu alan zorunlu hale getirildi
[StringLength(50), Display(Name = "Yeni Şifre")]
public string? Password { get; set; }
[Compare("Password", ErrorMessage = "Şifreler eşleşmiyor.")]
[StringLength(50), Display(Name = "Şifre Tekrar")]
public string? ConfirmPassword { get; set; }
}
}

View File

@@ -0,0 +1,10 @@
namespace ConstructorApp.DtoLayer.CompanyInfoDto
{
public class GetCompanyInfoDto
{
public int CompanyInfoID { get; set; }
public string? Value { get; set; }
public string? Title { get; set; }
public string? SubTitle { get; set; }
}
}

View File

@@ -0,0 +1,10 @@
namespace ConstructorApp.DtoLayer.CompanyInfoDto
{
public class ResultCompanyInfoDto
{
public int CompanyInfoID { get; set; }
public string? Value { get; set; }
public string? Title { get; set; }
public string? SubTitle { get; set; }
}
}

View File

@@ -0,0 +1,10 @@
namespace ConstructorApp.DtoLayer.CompanyInfoDto
{
public class UpdateCompanyInfoDto
{
public int CompanyInfoID { get; set; }
public string? Value { get; set; }
public string? Title { get; set; }
public string? SubTitle { get; set; }
}
}

View File

@@ -0,0 +1,9 @@
namespace ConstructorApp.DtoLayer.CompanyInfoVideoDto
{
public class GetCompanyInfoVideoDto
{
public int CompanyInfoVideoID { get; set; }
public string? VideoUrl { get; set; }
}
}

View File

@@ -0,0 +1,8 @@
namespace ConstructorApp.DtoLayer.CompanyInfoVideoDto
{
public class ResultCompanyInfoVideoDto
{
public int CompanyInfoVideoID { get; set; }
public string? VideoUrl { get; set; }
}
}

View File

@@ -0,0 +1,8 @@
namespace ConstructorApp.DtoLayer.CompanyInfoVideoDto
{
public class UpdateCompanyInfoVideoDto
{
public int CompanyInfoVideoID { get; set; }
public string? VideoUrl { get; set; }
}
}

View File

@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\ConstructorApp.EntityLayer\ConstructorApp.EntityLayer.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,12 @@
namespace ConstructorApp.DtoLayer.ContactUsDto
{
public class CreateContactUsDto
{
public DateTime Date { get; set; } = DateTime.Now;
public string? NameSurname { get; set; }
public string? Mail { get; set; }
public string? Phone { get; set; }
public string? MessageContent { get; set; }
public bool Status { get; set; }
}
}

View File

@@ -0,0 +1,13 @@
namespace ConstructorApp.DtoLayer.ContactUsDto
{
public class GetContactUsDto
{
public int ContactusID { get; set; }
public DateTime Date { get; set; } = DateTime.Now;
public string? NameSurname { get; set; }
public string? Mail { get; set; }
public string? Phone { get; set; }
public string? MessageContent { get; set; }
public bool Status { get; set; }
}
}

View File

@@ -0,0 +1,13 @@
namespace ConstructorApp.DtoLayer.ContactUsDto
{
public class ResultContactUsDto
{
public int ContactusID { get; set; }
public DateTime Date { get; set; } = DateTime.Now;
public string? NameSurname { get; set; }
public string? Mail { get; set; }
public string? Phone { get; set; }
public string? MessageContent { get; set; }
public bool Status { get; set; }
}
}

View File

@@ -0,0 +1,13 @@
namespace ConstructorApp.DtoLayer.ContactUsDto
{
public class UpdateContactUsDto
{
public int ContactusID { get; set; }
public DateTime Date { get; set; } = DateTime.Now;
public string? NameSurname { get; set; }
public string? Mail { get; set; }
public string? Phone { get; set; }
public string? MessageContent { get; set; }
public bool Status { get; set; }
}
}

View File

@@ -0,0 +1,14 @@
namespace ConstructorApp.DtoLayer.FooterDto
{
public class GetFooterDto
{
public int FooterID { get; set; }
public string? LogoUrl { get; set; }
public string? Phone { get; set; }
public string? Mail { get; set; }
public string? Facebook { get; set; }
public string? Instagram { get; set; }
public string? Linkedin { get; set; }
public string? Youtube { get; set; }
}
}

View File

@@ -0,0 +1,14 @@
namespace ConstructorApp.DtoLayer.FooterDto
{
public class ResultFooterDto
{
public int FooterID { get; set; }
public string? LogoUrl { get; set; }
public string? Phone { get; set; }
public string? Mail { get; set; }
public string? Facebook { get; set; }
public string? Instagram { get; set; }
public string? Linkedin { get; set; }
public string? Youtube { get; set; }
}
}

View File

@@ -0,0 +1,14 @@
namespace ConstructorApp.DtoLayer.FooterDto
{
public class UpdateFooterDto
{
public int FooterID { get; set; }
public string? LogoUrl { get; set; }
public string? Phone { get; set; }
public string? Mail { get; set; }
public string? Facebook { get; set; }
public string? Instagram { get; set; }
public string? Linkedin { get; set; }
public string? Youtube { get; set; }
}
}

View File

@@ -0,0 +1,9 @@
namespace ConstructorApp.DtoLayer.HomeBannerDto
{
public class CreateHomeBannerDto
{
public string? Title { get; set; }
public string? SubTitle { get; set; }
public string? LogoUrl { get; set; }
}
}

View File

@@ -0,0 +1,10 @@
namespace ConstructorApp.DtoLayer.HomeBannerDto
{
public class GetHomeBannerDto
{
public int HomeBannerID { get; set; }
public string? Title { get; set; }
public string? SubTitle { get; set; }
public string? LogoUrl { get; set; }
}
}

View File

@@ -0,0 +1,10 @@
namespace ConstructorApp.DtoLayer.HomeBannerDto
{
public class ResultHomeBannerDto
{
public int HomeBannerID { get; set; }
public string? Title { get; set; }
public string? SubTitle { get; set; }
public string? LogoUrl { get; set; }
}
}

View File

@@ -0,0 +1,10 @@
namespace ConstructorApp.DtoLayer.HomeBannerDto
{
public class UpdateHomeBannerDto
{
public int HomeBannerID { get; set; }
public string? Title { get; set; }
public string? SubTitle { get; set; }
public string? LogoUrl { get; set; }
}
}

View File

@@ -0,0 +1,20 @@
using static ConstructorApp.EntityLayer.Entities.Project;
namespace ConstructorApp.DtoLayer.ProjectDto
{
public class CreateProjectDto
{
public string? CoverUrl { get; set; }
public DateOnly Date { get; set; }
public string? Title { get; set; }
public string? Location { get; set; }
public string? ShortDescription { get; set; } //Exterior design
public string? LongDescription { get; set; }
public string? GoogleMapIFrame { get; set; }
public string? VideoUrl { get; set; }
public string? FloorPlanUrl { get; set; }
public bool IsActive { get; set; } //0=Pasif 1=Aktif
public string? Slug { get; set; }
public ProjectStatus Status { get; set; }
}
}

View File

@@ -0,0 +1,21 @@
using static ConstructorApp.EntityLayer.Entities.Project;
namespace ConstructorApp.DtoLayer.ProjectDto
{
public class GetProjectDto
{
public int ProjectID { get; set; }
public string? CoverUrl { get; set; }
public DateOnly Date { get; set; }
public string? Title { get; set; }
public string? Location { get; set; }
public string? ShortDescription { get; set; } //Exterior design
public string? LongDescription { get; set; }
public string? GoogleMapIFrame { get; set; }
public string? VideoUrl { get; set; }
public string? FloorPlanUrl { get; set; }
public bool IsActive { get; set; } //0=Pasif 1=Aktif
public string? Slug { get; set; }
public ProjectStatus Status { get; set; }
}
}

View File

@@ -0,0 +1,22 @@
using static ConstructorApp.EntityLayer.Entities.Project;
namespace ConstructorApp.DtoLayer.ProjectDto
{
public class ResultProjectDto
{
public int ProjectID { get; set; }
public string? CoverUrl { get; set; }
public DateOnly Date { get; set; }
public string? Title { get; set; }
public string? Location { get; set; }
public string? ShortDescription { get; set; } //Exterior design
public string? LongDescription { get; set; }
public string? GoogleMapIFrame { get; set; }
public string? VideoUrl { get; set; }
public string? FloorPlanUrl { get; set; }
public bool IsActive { get; set; } //0=Pasif 1=Aktif
public string? Slug { get; set; }
public List<string>? ImageUrls { get; set; }
public ProjectStatus Status { get; set; }
}
}

View File

@@ -0,0 +1,21 @@
using static ConstructorApp.EntityLayer.Entities.Project;
namespace ConstructorApp.DtoLayer.ProjectDto
{
public class UpdateProjectDto
{
public int ProjectID { get; set; }
public string? CoverUrl { get; set; }
public DateOnly Date { get; set; }
public string? Title { get; set; }
public string? Location { get; set; }
public string? ShortDescription { get; set; } //Exterior design
public string? LongDescription { get; set; }
public string? GoogleMapIFrame { get; set; }
public string? VideoUrl { get; set; }
public string? FloorPlanUrl { get; set; }
public bool IsActive { get; set; } //0=Pasif 1=Aktif
public string? Slug { get; set; }
public ProjectStatus Status { get; set; }
}
}

View File

@@ -0,0 +1,8 @@
namespace ConstructorApp.DtoLayer.ProjectGalleryDto
{
public class CreateProjectGalleryDto
{
public string? ImageUrl { get; set; }
public int ProjectID { get; set; }
}
}

View File

@@ -0,0 +1,9 @@
namespace ConstructorApp.DtoLayer.ProjectGalleryDto
{
public class GetProjectGalleryDto
{
public int ProjectGalleryID { get; set; }
public string? ImageUrl { get; set; }
public int ProjectID { get; set; }
}
}

View File

@@ -0,0 +1,9 @@
namespace ConstructorApp.DtoLayer.ProjectGalleryDto
{
public class ResultProjectGalleryDto
{
public int ProjectGalleryID { get; set; }
public string? ImageUrl { get; set; }
public int ProjectID { get; set; }
}
}

View File

@@ -0,0 +1,9 @@
namespace ConstructorApp.DtoLayer.ProjectGalleryDto
{
public class UpdateProjectGalleryDto
{
public int ProjectGalleryID { get; set; }
public string? ImageUrl { get; set; }
public int ProjectID { get; set; }
}
}

View File

@@ -0,0 +1,8 @@
namespace ConstructorApp.DtoLayer.ReferenceDto
{
public class CreateReferenceDto
{
public string? LogoUrl { get; set; }
public string? WebUrl { get; set; }
}
}

View File

@@ -0,0 +1,9 @@
namespace ConstructorApp.DtoLayer.ReferenceDto
{
public class GetReferenceDto
{
public int ReferenceID { get; set; }
public string? LogoUrl { get; set; }
public string? WebUrl { get; set; }
}
}

View File

@@ -0,0 +1,9 @@
namespace ConstructorApp.DtoLayer.ReferenceDto
{
public class ResultReferenceDto
{
public int ReferenceID { get; set; }
public string? LogoUrl { get; set; }
public string? WebUrl { get; set; }
}
}

View File

@@ -0,0 +1,9 @@
namespace ConstructorApp.DtoLayer.ReferenceDto
{
public class UpdateReferenceDto
{
public int ReferenceID { get; set; }
public string? LogoUrl { get; set; }
public string? WebUrl { get; set; }
}
}

View File

@@ -0,0 +1,10 @@
namespace ConstructorApp.DtoLayer.ServiceDto
{
public class GetServiceDto
{
public int ServiceID { get; set; }
public string? Title { get; set; }
public string? SubTitle { get; set; }
public bool IsActive { get; set; }
}
}

View File

@@ -0,0 +1,10 @@
namespace ConstructorApp.DtoLayer.ServiceDto
{
public class ResultServiceDto
{
public int ServiceID { get; set; }
public string? Title { get; set; }
public string? SubTitle { get; set; }
public bool IsActive { get; set; }
}
}

View File

@@ -0,0 +1,10 @@
namespace ConstructorApp.DtoLayer.ServiceDto
{
public class UpdateServiceDto
{
public int ServiceID { get; set; }
public string? Title { get; set; }
public string? SubTitle { get; set; }
public bool IsActive { get; set; }
}
}

View File

@@ -0,0 +1,10 @@
namespace ConstructorApp.DtoLayer.SliderDto
{
public class CreateSliderDto
{
public string? Location { get; set; }
public string? Sqm { get; set; }
public string? PriceInfo { get; set; }
public string? ImageUrl { get; set; }
}
}

View File

@@ -0,0 +1,11 @@
namespace ConstructorApp.DtoLayer.SliderDto
{
public class GetSliderDto
{
public int SliderID { get; set; }
public string? Location { get; set; }
public string? Sqm { get; set; }
public string? PriceInfo { get; set; }
public string? ImageUrl { get; set; }
}
}

Some files were not shown because too many files have changed in this diff Show More