├── EntityCoreLessons ├── EntityCoreLesson │ ├── appsettings.Development.json │ ├── EntityCoreLesson.http │ ├── Domain │ │ ├── DTOs │ │ │ └── CompanyDTO.cs │ │ └── Models │ │ │ └── Company.cs │ ├── appsettings.json │ ├── Infastructure │ │ └── ApplicationDbContext.cs │ ├── Application │ │ └── MyServices │ │ │ └── CompanyService │ │ │ ├── ICompanyService.cs │ │ │ └── CompanyService.cs │ ├── EntityCoreLesson.csproj │ ├── Properties │ │ └── launchSettings.json │ ├── Migrations │ │ ├── 20240221065553_firstMig.cs │ │ ├── ApplicationDbContextModelSnapshot.cs │ │ └── 20240221065553_firstMig.Designer.cs │ ├── Program.cs │ └── Controllers │ │ └── CompanyController.cs └── EntityCoreLessons.sln ├── MarketplaceSolution ├── Online.Marketplace │ ├── appsettings.Development.json │ ├── Entities │ │ └── DTOs │ │ │ ├── ShopsDTO.cs │ │ │ ├── CategoryDTO.cs │ │ │ ├── CustomersDTO.cs │ │ │ └── ProductDTO.cs │ ├── Online.Marketplace.http │ ├── Models │ │ ├── Shops.cs │ │ ├── Category.cs │ │ ├── Customers.cs │ │ └── Product.cs │ ├── appsettings.json │ ├── MyServices │ │ ├── IServices │ │ │ ├── IShopService.cs │ │ │ ├── IProductService.cs │ │ │ ├── ICategoryService.cs │ │ │ └── ICustomerService.cs │ │ └── Services │ │ │ ├── ProductService.cs │ │ │ ├── ShopService.cs │ │ │ ├── CategoryService.cs │ │ │ └── CustomerService.cs │ ├── Repository │ │ ├── ShopCRUD │ │ │ ├── IShopCRUD.cs │ │ │ └── ShopCRUD.cs │ │ ├── CategoryCRUD │ │ │ ├── ICategoryCRUD.cs │ │ │ └── CategoryCRUD.cs │ │ ├── ProductCRUd │ │ │ ├── IProductCRUD.cs │ │ │ └── ProductCRUD.cs │ │ └── CustomerCRUD │ │ │ ├── ICustomerCRUD.cs │ │ │ └── CustomerCRUD.cs │ ├── Online.Marketplace.csproj │ ├── Properties │ │ └── launchSettings.json │ ├── Controllers │ │ ├── ShopController.cs │ │ ├── ProductController.cs │ │ ├── CustomerController.cs │ │ └── CategoryController.cs │ ├── Program.cs │ └── Database │ │ └── extensiondb.sql └── MarketplaceSolution.sln ├── README.md └── .gitignore /EntityCoreLessons/EntityCoreLesson/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /MarketplaceSolution/Online.Marketplace/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /EntityCoreLessons/EntityCoreLesson/EntityCoreLesson.http: -------------------------------------------------------------------------------- 1 | @EntityCoreLesson_HostAddress = http://localhost:5032 2 | 3 | GET {{EntityCoreLesson_HostAddress}}/weatherforecast/ 4 | Accept: application/json 5 | 6 | ### 7 | -------------------------------------------------------------------------------- /MarketplaceSolution/Online.Marketplace/Entities/DTOs/ShopsDTO.cs: -------------------------------------------------------------------------------- 1 | namespace Online.Marketplace.Entities.DTOs 2 | { 3 | public class ShopsDTO 4 | { 5 | public string Shop_Name { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /MarketplaceSolution/Online.Marketplace/Entities/DTOs/CategoryDTO.cs: -------------------------------------------------------------------------------- 1 | namespace Online.Marketplace.Entities.DTOs 2 | { 3 | public class CategoryDTO 4 | { 5 | public string Category_name { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /MarketplaceSolution/Online.Marketplace/Online.Marketplace.http: -------------------------------------------------------------------------------- 1 | @Online.Marketplace_HostAddress = http://localhost:5277 2 | 3 | GET {{Online.Marketplace_HostAddress}}/weatherforecast/ 4 | Accept: application/json 5 | 6 | ### 7 | -------------------------------------------------------------------------------- /MarketplaceSolution/Online.Marketplace/Models/Shops.cs: -------------------------------------------------------------------------------- 1 | namespace Online.Marketplace.Models 2 | { 3 | public class Shops 4 | { 5 | public int Id { get; set; } 6 | public string Shop_Name { get; set; } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /MarketplaceSolution/Online.Marketplace/Models/Category.cs: -------------------------------------------------------------------------------- 1 | namespace Online.Marketplace.Models 2 | { 3 | public class Category 4 | { 5 | public int Id { get; set; } 6 | public string Category_name { get; set; } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /MarketplaceSolution/Online.Marketplace/Entities/DTOs/CustomersDTO.cs: -------------------------------------------------------------------------------- 1 | namespace Online.Marketplace.Entities.DTOs 2 | { 3 | public class CustomersDTO 4 | { 5 | public string Full_Name { get; set; } 6 | public int Age { get; set; } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /MarketplaceSolution/Online.Marketplace/Models/Customers.cs: -------------------------------------------------------------------------------- 1 | namespace Online.Marketplace.Models 2 | { 3 | public class Customers 4 | { 5 | public int Id { get; set; } 6 | public string full_Name { get; set; } 7 | public int Age { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /EntityCoreLessons/EntityCoreLesson/Domain/DTOs/CompanyDTO.cs: -------------------------------------------------------------------------------- 1 | namespace EntityCoreLesson.Domain.DTOs 2 | { 3 | public class CompanyDTO 4 | { 5 | public string Name { get; set; } 6 | public string? Description { get; set; } 7 | public long Employee_count { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /EntityCoreLessons/EntityCoreLesson/Domain/Models/Company.cs: -------------------------------------------------------------------------------- 1 | namespace EntityCoreLesson.Domain.Models 2 | { 3 | public class Company 4 | { 5 | public int Id { get; set; } 6 | public string Name { get; set; } 7 | public string? Description { get; set; } 8 | public long Employee_count { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /MarketplaceSolution/Online.Marketplace/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*", 9 | "ConnectionStrings": { 10 | "Postgres": "Server=127.0.0.1;Port=5432;Database=TestDb;User Id=postgres;Password=root;" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /EntityCoreLessons/EntityCoreLesson/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*", 9 | "ConnectionStrings": { 10 | "DefaultConnection": "Host=localhost;Port=5432;Database=EntityDB;username=postgres;password=root;" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /MarketplaceSolution/Online.Marketplace/Entities/DTOs/ProductDTO.cs: -------------------------------------------------------------------------------- 1 | namespace Online.Marketplace.Entities.DTOs 2 | { 3 | public class ProductDTO 4 | { 5 | public string Product_name { get; set; } 6 | public decimal Price { get; set; } 7 | public int Shop_id { get; set; } 8 | public int Category_id { get; set; } 9 | public int Customer_id { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /MarketplaceSolution/Online.Marketplace/Models/Product.cs: -------------------------------------------------------------------------------- 1 | namespace Online.Marketplace.Models 2 | { 3 | public class Product 4 | { 5 | public int Id { get; set; } 6 | public string Product_name { get; set; } 7 | public decimal Price { get; set; } 8 | public int Shop_id { get; set; } 9 | public int Category_id { get; set; } 10 | public int Customer_id { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /EntityCoreLessons/EntityCoreLesson/Infastructure/ApplicationDbContext.cs: -------------------------------------------------------------------------------- 1 | using EntityCoreLesson.Domain.Models; 2 | using Microsoft.EntityFrameworkCore; 3 | 4 | namespace EntityCoreLesson.Infastructure 5 | { 6 | public class ApplicationDbContext : DbContext 7 | { 8 | public ApplicationDbContext(DbContextOptions options) 9 | : base(options) 10 | { 11 | 12 | } 13 | public DbSet Companys { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /MarketplaceSolution/Online.Marketplace/MyServices/IServices/IShopService.cs: -------------------------------------------------------------------------------- 1 | using Online.Marketplace.Entities.DTOs; 2 | using Online.Marketplace.Models; 3 | 4 | namespace Online.Marketplace.MyServices.IServices 5 | { 6 | public interface IShopService 7 | { 8 | public string Create(ShopsDTO shop); 9 | public IEnumerable GetAll(); 10 | public Shops GetByID(int id); 11 | public string DeleteByID(int id); 12 | public string Update(int id, ShopsDTO shop); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /MarketplaceSolution/Online.Marketplace/Repository/ShopCRUD/IShopCRUD.cs: -------------------------------------------------------------------------------- 1 | using Online.Marketplace.Entities.DTOs; 2 | using Online.Marketplace.Models; 3 | 4 | namespace Online.Marketplace.Repository.ShopCRUD 5 | { 6 | public interface IShopCRUD 7 | { 8 | public string Create(ShopsDTO shop); 9 | public IEnumerable GetAll(); 10 | public Shops GetByID(int id); 11 | public string DeleteByID(int id); 12 | public string Update(int id, ShopsDTO product); 13 | } 14 | } 15 | 16 | -------------------------------------------------------------------------------- /MarketplaceSolution/Online.Marketplace/MyServices/IServices/IProductService.cs: -------------------------------------------------------------------------------- 1 | using Online.Marketplace.Entities.DTOs; 2 | using Online.Marketplace.Models; 3 | 4 | namespace Online.Marketplace.MyServices.IServices 5 | { 6 | public interface IProductService 7 | { 8 | public string Create(ProductDTO product); 9 | public IEnumerable GetAll(); 10 | 11 | public Product GetByID(int id); 12 | public string DeleteByID(int id); 13 | public string Update(int id, ProductDTO product); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /MarketplaceSolution/Online.Marketplace/Online.Marketplace.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net8.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /MarketplaceSolution/Online.Marketplace/MyServices/IServices/ICategoryService.cs: -------------------------------------------------------------------------------- 1 | using Online.Marketplace.Entities.DTOs; 2 | using Online.Marketplace.Models; 3 | 4 | namespace Online.Marketplace.MyServices.IServices 5 | { 6 | public interface ICategoryService 7 | { 8 | public string Create(CategoryDTO category); 9 | public IEnumerable GetAll(); 10 | 11 | public Category GetByID(int id); 12 | public string DeleteByID(int id); 13 | public string Update(int id, CategoryDTO category); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /MarketplaceSolution/Online.Marketplace/MyServices/IServices/ICustomerService.cs: -------------------------------------------------------------------------------- 1 | using Online.Marketplace.Entities.DTOs; 2 | using Online.Marketplace.Models; 3 | 4 | namespace Online.Marketplace.MyServices.IServices 5 | { 6 | public interface ICustomerService 7 | { 8 | public string Create(CustomersDTO customer); 9 | public IEnumerable GetAll(); 10 | public Customers GetByID(int id); 11 | public string DeleteByID(int id); 12 | public string Update(int id, CustomersDTO customers); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /MarketplaceSolution/Online.Marketplace/Repository/CategoryCRUD/ICategoryCRUD.cs: -------------------------------------------------------------------------------- 1 | using Online.Marketplace.Entities.DTOs; 2 | using Online.Marketplace.Models; 3 | 4 | namespace Online.Marketplace.Repository.CategoryCRUD 5 | { 6 | public interface ICategoryCRUD 7 | { 8 | public string Create(CategoryDTO category); 9 | public IEnumerable GetAll(); 10 | 11 | public Category GetByID(int id); 12 | public string DeleteByID(int id); 13 | public string Update(int id, CategoryDTO category); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /MarketplaceSolution/Online.Marketplace/Repository/ProductCRUd/IProductCRUD.cs: -------------------------------------------------------------------------------- 1 | using Online.Marketplace.Entities.DTOs; 2 | using Online.Marketplace.Models; 3 | using System.Globalization; 4 | 5 | namespace Online.Marketplace.Repository.ProductCRUd 6 | { 7 | public interface IProductCRUD 8 | { 9 | public string Create(ProductDTO product); 10 | public IEnumerable GetAll(); 11 | 12 | public Product GetByID(int id); 13 | public string DeleteByID(int id); 14 | public string Update(int id,ProductDTO product); 15 | 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /MarketplaceSolution/Online.Marketplace/Repository/CustomerCRUD/ICustomerCRUD.cs: -------------------------------------------------------------------------------- 1 | using Online.Marketplace.Entities.DTOs; 2 | using Online.Marketplace.Models; 3 | using System.Runtime.InteropServices; 4 | namespace Online.Marketplace.Repository.CustomerCRUD 5 | { 6 | public interface ICustomerCRUD 7 | { 8 | public string Create(CustomersDTO customer); 9 | public IEnumerable GetAll(); 10 | public Customers GetByID(int id); 11 | public string DeleteByID(int id); 12 | public string Update(int id, CustomersDTO product); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /EntityCoreLessons/EntityCoreLesson/Application/MyServices/CompanyService/ICompanyService.cs: -------------------------------------------------------------------------------- 1 | using EntityCoreLesson.Domain.DTOs; 2 | using EntityCoreLesson.Domain.Models; 3 | 4 | namespace EntityCoreLesson.Application.MyServices.CompanyService 5 | { 6 | public interface ICompanyService 7 | { 8 | public Task CreateCompanyAsync(CompanyDTO cmp); 9 | public Task> GetAllCompanysAsync(); 10 | public Task GetCompanyByIdAsync(int id); 11 | public Task DeleteCompanyByIdAsync(int id); 12 | public Task UpdateCompanyById(int id, CompanyDTO company); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /EntityCoreLessons/EntityCoreLesson/EntityCoreLesson.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net8.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | all 13 | runtime; build; native; contentfiles; analyzers; buildtransitive 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /EntityCoreLessons/EntityCoreLessons.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.9.34607.119 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EntityCoreLesson", "EntityCoreLesson\EntityCoreLesson.csproj", "{D76AA069-9AF5-480F-A45D-C0FABEB829B1}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {D76AA069-9AF5-480F-A45D-C0FABEB829B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {D76AA069-9AF5-480F-A45D-C0FABEB829B1}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {D76AA069-9AF5-480F-A45D-C0FABEB829B1}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {D76AA069-9AF5-480F-A45D-C0FABEB829B1}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {052DE0D9-8380-4E93-8D29-43479C2679FA} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /MarketplaceSolution/MarketplaceSolution.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.9.34607.119 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Online.Marketplace", "Online.Marketplace\Online.Marketplace.csproj", "{628D516F-D5AB-4805-806A-19D8F6B32C55}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {628D516F-D5AB-4805-806A-19D8F6B32C55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {628D516F-D5AB-4805-806A-19D8F6B32C55}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {628D516F-D5AB-4805-806A-19D8F6B32C55}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {628D516F-D5AB-4805-806A-19D8F6B32C55}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {F5E3F130-8E2B-4F0B-9E0D-A8AB62506B70} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /EntityCoreLessons/EntityCoreLesson/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | "windowsAuthentication": false, 5 | "anonymousAuthentication": true, 6 | "iisExpress": { 7 | "applicationUrl": "http://localhost:10968", 8 | "sslPort": 44390 9 | } 10 | }, 11 | "profiles": { 12 | "http": { 13 | "commandName": "Project", 14 | "dotnetRunMessages": true, 15 | "launchBrowser": true, 16 | "launchUrl": "swagger", 17 | "applicationUrl": "http://localhost:5032", 18 | "environmentVariables": { 19 | "ASPNETCORE_ENVIRONMENT": "Development" 20 | } 21 | }, 22 | "https": { 23 | "commandName": "Project", 24 | "dotnetRunMessages": true, 25 | "launchBrowser": true, 26 | "launchUrl": "swagger", 27 | "applicationUrl": "https://localhost:7025;http://localhost:5032", 28 | "environmentVariables": { 29 | "ASPNETCORE_ENVIRONMENT": "Development" 30 | } 31 | }, 32 | "IIS Express": { 33 | "commandName": "IISExpress", 34 | "launchBrowser": true, 35 | "launchUrl": "swagger", 36 | "environmentVariables": { 37 | "ASPNETCORE_ENVIRONMENT": "Development" 38 | } 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /MarketplaceSolution/Online.Marketplace/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | "windowsAuthentication": false, 5 | "anonymousAuthentication": true, 6 | "iisExpress": { 7 | "applicationUrl": "http://localhost:37374", 8 | "sslPort": 44355 9 | } 10 | }, 11 | "profiles": { 12 | "http": { 13 | "commandName": "Project", 14 | "dotnetRunMessages": true, 15 | "launchBrowser": true, 16 | "launchUrl": "swagger", 17 | "applicationUrl": "http://localhost:5277", 18 | "environmentVariables": { 19 | "ASPNETCORE_ENVIRONMENT": "Development" 20 | } 21 | }, 22 | "https": { 23 | "commandName": "Project", 24 | "dotnetRunMessages": true, 25 | "launchBrowser": true, 26 | "launchUrl": "swagger", 27 | "applicationUrl": "https://localhost:7171;http://localhost:5277", 28 | "environmentVariables": { 29 | "ASPNETCORE_ENVIRONMENT": "Development" 30 | } 31 | }, 32 | "IIS Express": { 33 | "commandName": "IISExpress", 34 | "launchBrowser": true, 35 | "launchUrl": "swagger", 36 | "environmentVariables": { 37 | "ASPNETCORE_ENVIRONMENT": "Development" 38 | } 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /EntityCoreLessons/EntityCoreLesson/Migrations/20240221065553_firstMig.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore.Migrations; 2 | using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; 3 | 4 | #nullable disable 5 | 6 | namespace EntityCoreLesson.Migrations 7 | { 8 | /// 9 | public partial class firstMig : Migration 10 | { 11 | /// 12 | protected override void Up(MigrationBuilder migrationBuilder) 13 | { 14 | migrationBuilder.CreateTable( 15 | name: "Companys", 16 | columns: table => new 17 | { 18 | Id = table.Column(type: "integer", nullable: false) 19 | .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), 20 | Name = table.Column(type: "text", nullable: false), 21 | Description = table.Column(type: "text", nullable: true), 22 | Employee_count = table.Column(type: "bigint", nullable: false) 23 | }, 24 | constraints: table => 25 | { 26 | table.PrimaryKey("PK_Companys", x => x.Id); 27 | }); 28 | } 29 | 30 | /// 31 | protected override void Down(MigrationBuilder migrationBuilder) 32 | { 33 | migrationBuilder.DropTable( 34 | name: "Companys"); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /EntityCoreLessons/EntityCoreLesson/Program.cs: -------------------------------------------------------------------------------- 1 | 2 | using EntityCoreLesson.Application.MyServices.CompanyService; 3 | using EntityCoreLesson.Infastructure; 4 | using Microsoft.EntityFrameworkCore; 5 | 6 | namespace EntityCoreLesson 7 | { 8 | public class Program 9 | { 10 | public static void Main(string[] args) 11 | { 12 | var builder = WebApplication.CreateBuilder(args); 13 | 14 | // Add services to the container. 15 | 16 | builder.Services.AddControllers(); 17 | 18 | builder.Services.AddDbContext(options => 19 | { 20 | options.UseNpgsql(builder.Configuration.GetConnectionString("DefaultConnection")); 21 | }); 22 | builder.Services.AddScoped(); 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle 31 | builder.Services.AddEndpointsApiExplorer(); 32 | builder.Services.AddSwaggerGen(); 33 | 34 | var app = builder.Build(); 35 | 36 | // Configure the HTTP request pipeline. 37 | if (app.Environment.IsDevelopment()) 38 | { 39 | app.UseSwagger(); 40 | app.UseSwaggerUI(); 41 | } 42 | 43 | app.UseHttpsRedirection(); 44 | 45 | app.UseAuthorization(); 46 | 47 | 48 | app.MapControllers(); 49 | 50 | app.Run(); 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /MarketplaceSolution/Online.Marketplace/Controllers/ShopController.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Http; 2 | using Microsoft.AspNetCore.Mvc; 3 | using Online.Marketplace.Entities.DTOs; 4 | using Online.Marketplace.Models; 5 | using Online.Marketplace.MyServices.IServices; 6 | using Online.Marketplace.Repository.ShopCRUD; 7 | 8 | namespace Online.Marketplace.Controllers 9 | { 10 | [Route("api/[controller]/[action]")] 11 | [ApiController] 12 | public class ShopController : ControllerBase 13 | { 14 | private readonly IShopService _shopSer; 15 | 16 | public ShopController(IShopService shop) 17 | { 18 | _shopSer = shop; 19 | } 20 | 21 | [HttpPost] 22 | public string Create(ShopsDTO shps) 23 | { 24 | string? res = _shopSer.Create(shps); 25 | return res; 26 | } 27 | [HttpGet] 28 | public Shops GetById(int id) 29 | { 30 | Shops? x = _shopSer.GetByID(id); 31 | return x; 32 | } 33 | [HttpGet] 34 | public IEnumerable GetAll() 35 | { 36 | IEnumerable? x = _shopSer.GetAll(); 37 | return x; 38 | } 39 | [HttpDelete] 40 | public string DeleteById(int id) 41 | { 42 | string? x = _shopSer.DeleteByID(id); 43 | return x; 44 | } 45 | [HttpPut] 46 | public string Update(int id, ShopsDTO shops) 47 | { 48 | string? x = _shopSer.Update(id, shops); 49 | return x; 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /MarketplaceSolution/Online.Marketplace/Controllers/ProductController.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Http; 2 | using Microsoft.AspNetCore.Mvc; 3 | using Online.Marketplace.Entities.DTOs; 4 | using Online.Marketplace.Models; 5 | using Online.Marketplace.MyServices.IServices; 6 | using Online.Marketplace.Repository.ProductCRUd; 7 | 8 | namespace Online.Marketplace.Controllers 9 | { 10 | [Route("api/[controller]/[action]")] 11 | [ApiController] 12 | public class ProductController : ControllerBase 13 | { 14 | private readonly IProductService _productSer; 15 | public ProductController(IProductService ser) 16 | { 17 | _productSer = ser; 18 | } 19 | 20 | [HttpPost] 21 | public string Create(ProductDTO product) 22 | { 23 | string? res = _productSer.Create(product); 24 | return res; 25 | } 26 | [HttpGet] 27 | public Product GetById(int id) 28 | { 29 | Product? x = _productSer.GetByID(id); 30 | return x; 31 | } 32 | [HttpGet] 33 | public IEnumerable GetAll() 34 | { 35 | IEnumerable? x = _productSer.GetAll(); 36 | return x; 37 | } 38 | [HttpDelete] 39 | public string DeleteById(int id) 40 | { 41 | string? x = _productSer.DeleteByID(id); 42 | return x; 43 | } 44 | [HttpPut] 45 | public string Update(int id, ProductDTO product) 46 | { 47 | string? x = _productSer.Update(id, product); 48 | return x; 49 | } 50 | 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /MarketplaceSolution/Online.Marketplace/Controllers/CustomerController.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Http; 2 | using Microsoft.AspNetCore.Mvc; 3 | using Online.Marketplace.Entities.DTOs; 4 | using Online.Marketplace.Models; 5 | using Online.Marketplace.MyServices.IServices; 6 | using Online.Marketplace.Repository.CustomerCRUD; 7 | using Online.Marketplace.Repository.ShopCRUD; 8 | 9 | namespace Online.Marketplace.Controllers 10 | { 11 | [Route("api/[controller]/[action]")] 12 | [ApiController] 13 | public class CustomerController : ControllerBase 14 | { 15 | private readonly ICustomerService _cusSer; 16 | 17 | public CustomerController(ICustomerService cus) 18 | { 19 | _cusSer = cus; 20 | } 21 | 22 | [HttpPost] 23 | public string Create(CustomersDTO cs) 24 | { 25 | string? res = _cusSer.Create(cs); 26 | return res; 27 | } 28 | [HttpGet] 29 | public Customers GetById(int id) 30 | { 31 | Customers? x = _cusSer.GetByID(id); 32 | return x; 33 | } 34 | [HttpGet] 35 | public IEnumerable GetAll() 36 | { 37 | IEnumerable? x = _cusSer.GetAll(); 38 | return x; 39 | } 40 | [HttpDelete] 41 | public string DeleteById(int id) 42 | { 43 | string? x = _cusSer.DeleteByID(id); 44 | return x; 45 | } 46 | [HttpPut] 47 | public string Update(int id, CustomersDTO css) 48 | { 49 | string? x = _cusSer.Update(id, css); 50 | return x; 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /MarketplaceSolution/Online.Marketplace/Controllers/CategoryController.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Http; 2 | using Microsoft.AspNetCore.Mvc; 3 | using Online.Marketplace.Entities.DTOs; 4 | using Online.Marketplace.Models; 5 | using Online.Marketplace.MyServices.IServices; 6 | using Online.Marketplace.Repository.CategoryCRUD; 7 | 8 | namespace Online.Marketplace.Controllers 9 | { 10 | [Route("api/[controller]/[action]")] 11 | [ApiController] 12 | public class CategoryController : ControllerBase 13 | { 14 | private readonly ICategoryService _categorySer; 15 | public CategoryController(ICategoryService categoryRepo) 16 | { 17 | _categorySer = categoryRepo; 18 | } 19 | 20 | [HttpGet] 21 | public IEnumerable GetAll() 22 | { 23 | IEnumerable? x = _categorySer.GetAll(); 24 | return x; 25 | } 26 | [HttpGet] 27 | public Category GetById(int id) 28 | { 29 | Category? x = _categorySer.GetByID(id); 30 | return x; 31 | } 32 | [HttpPost] 33 | public string Create(CategoryDTO category) 34 | { 35 | string? x = _categorySer.Create(category); 36 | return x; 37 | } 38 | [HttpDelete] 39 | public string Delete(int id) 40 | { 41 | string? x = _categorySer.DeleteByID(id); 42 | return x; 43 | } 44 | [HttpPut] 45 | public string Update(int id,CategoryDTO category) 46 | { 47 | string? x = _categorySer.Update(id, category); 48 | return x; 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /EntityCoreLessons/EntityCoreLesson/Migrations/ApplicationDbContextModelSnapshot.cs: -------------------------------------------------------------------------------- 1 | // 2 | using EntityCoreLesson.Infastructure; 3 | using Microsoft.EntityFrameworkCore; 4 | using Microsoft.EntityFrameworkCore.Infrastructure; 5 | using Microsoft.EntityFrameworkCore.Storage.ValueConversion; 6 | using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; 7 | 8 | #nullable disable 9 | 10 | namespace EntityCoreLesson.Migrations 11 | { 12 | [DbContext(typeof(ApplicationDbContext))] 13 | partial class ApplicationDbContextModelSnapshot : ModelSnapshot 14 | { 15 | protected override void BuildModel(ModelBuilder modelBuilder) 16 | { 17 | #pragma warning disable 612, 618 18 | modelBuilder 19 | .HasAnnotation("ProductVersion", "9.0.0-preview.1.24081.2") 20 | .HasAnnotation("Relational:MaxIdentifierLength", 63); 21 | 22 | NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); 23 | 24 | modelBuilder.Entity("EntityCoreLesson.Domain.Models.Company", b => 25 | { 26 | b.Property("Id") 27 | .ValueGeneratedOnAdd() 28 | .HasColumnType("integer"); 29 | 30 | NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); 31 | 32 | b.Property("Description") 33 | .HasColumnType("text"); 34 | 35 | b.Property("Employee_count") 36 | .HasColumnType("bigint"); 37 | 38 | b.Property("Name") 39 | .IsRequired() 40 | .HasColumnType("text"); 41 | 42 | b.HasKey("Id"); 43 | 44 | b.ToTable("Companys"); 45 | }); 46 | #pragma warning restore 612, 618 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ABUxIBO project online marketplace 2 | Welcome to our Online Market! This platform provides a convenient way to buy and sell various products online. 3 | 4 | ## Features 5 | 6 | - **Product Listings:** Browse through a wide range of products listed by sellers. 7 | - **Search Functionality:** Search for specific products using keywords or filters. 8 | - **User Authentication:** Create an account to buy or sell products securely. 9 | - **Seller Dashboard:** Sellers have access to a dashboard to manage their listings and sales. 10 | - **Shopping Cart:** Add products to your cart for easy checkout. 11 | - **Secure Transactions:** Ensure safe and secure transactions for both buyers and sellers. 12 | - **Order Tracking:** Track the status of your orders from purchase to delivery. 13 | - **Rating and Reviews:** Leave feedback and reviews for products and sellers. 14 | 15 | ## Installation 16 | 17 | To run the Online Market locally, follow these steps: 18 | 19 | 1. Clone this repository: `git clone https://github.com/your-username/online-market.git` 20 | 2. Navigate to the project directory: `cd online-market` 21 | 3. Install dependencies: `npm install` 22 | 4. Start the development server: `npm start` 23 | 5. Open your web browser and go to `http://localhost:3000` 24 | 25 | ## Technologies Used 26 | 27 | - **Frontend:** React.js, HTML, CSS 28 | - **Backend:** Node.js, Express.js 29 | - **Database:** MongoDB 30 | - **Authentication:** JSON Web Tokens (JWT) 31 | - **Payment:** Stripe API 32 | 33 | ## Contributing 34 | 35 | We welcome contributions from the community! If you find any issues or have suggestions for improvements, feel free to open an issue or create a pull request. 36 | 37 | ## License 38 | 39 | This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details. 40 | 41 | ## Contact 42 | 43 | For any inquiries or support, please contact us at programmiy_marlet@onlinemarket.com. 44 | -------------------------------------------------------------------------------- /EntityCoreLessons/EntityCoreLesson/Migrations/20240221065553_firstMig.Designer.cs: -------------------------------------------------------------------------------- 1 | // 2 | using EntityCoreLesson.Infastructure; 3 | using Microsoft.EntityFrameworkCore; 4 | using Microsoft.EntityFrameworkCore.Infrastructure; 5 | using Microsoft.EntityFrameworkCore.Migrations; 6 | using Microsoft.EntityFrameworkCore.Storage.ValueConversion; 7 | using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; 8 | 9 | #nullable disable 10 | 11 | namespace EntityCoreLesson.Migrations 12 | { 13 | [DbContext(typeof(ApplicationDbContext))] 14 | [Migration("20240221065553_firstMig")] 15 | partial class firstMig 16 | { 17 | /// 18 | protected override void BuildTargetModel(ModelBuilder modelBuilder) 19 | { 20 | #pragma warning disable 612, 618 21 | modelBuilder 22 | .HasAnnotation("ProductVersion", "9.0.0-preview.1.24081.2") 23 | .HasAnnotation("Relational:MaxIdentifierLength", 63); 24 | 25 | NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); 26 | 27 | modelBuilder.Entity("EntityCoreLesson.Domain.Models.Company", b => 28 | { 29 | b.Property("Id") 30 | .ValueGeneratedOnAdd() 31 | .HasColumnType("integer"); 32 | 33 | NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); 34 | 35 | b.Property("Description") 36 | .HasColumnType("text"); 37 | 38 | b.Property("Employee_count") 39 | .HasColumnType("bigint"); 40 | 41 | b.Property("Name") 42 | .IsRequired() 43 | .HasColumnType("text"); 44 | 45 | b.HasKey("Id"); 46 | 47 | b.ToTable("Companys"); 48 | }); 49 | #pragma warning restore 612, 618 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /MarketplaceSolution/Online.Marketplace/Program.cs: -------------------------------------------------------------------------------- 1 | 2 | using Online.Marketplace.Models; 3 | using Online.Marketplace.MyServices.IServices; 4 | using Online.Marketplace.MyServices.Services; 5 | using Online.Marketplace.Repository.CategoryCRUD; 6 | using Online.Marketplace.Repository.CustomerCRUD; 7 | using Online.Marketplace.Repository.ProductCRUd; 8 | using Online.Marketplace.Repository.ShopCRUD; 9 | 10 | namespace Online.Marketplace 11 | { 12 | public class Program 13 | { 14 | public static void Main(string[] args) 15 | { 16 | var builder = WebApplication.CreateBuilder(args); 17 | 18 | // Add services to the container. 19 | 20 | builder.Services.AddControllers(); 21 | // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle 22 | builder.Services.AddEndpointsApiExplorer(); 23 | builder.Services.AddSwaggerGen(); 24 | builder.Services.AddScoped(); 25 | builder.Services.AddScoped(); 26 | builder.Services.AddScoped(); 27 | builder.Services.AddScoped(); 28 | builder.Services.AddScoped(); 29 | builder.Services.AddScoped(); 30 | builder.Services.AddScoped(); 31 | builder.Services.AddScoped(); 32 | 33 | var app = builder.Build(); 34 | 35 | // Configure the HTTP request pipeline. 36 | if (app.Environment.IsDevelopment()) 37 | { 38 | app.UseSwagger(); 39 | app.UseSwaggerUI(); 40 | } 41 | 42 | app.UseHttpsRedirection(); 43 | 44 | app.UseAuthorization(); 45 | 46 | 47 | app.MapControllers(); 48 | 49 | app.Run(); 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /MarketplaceSolution/Online.Marketplace/Database/extensiondb.sql: -------------------------------------------------------------------------------- 1 | -- CREATE TABLE Shops( 2 | -- id SERIAL NOT NULL, 3 | -- shop_name VARCHAR(255) NOT NULL 4 | -- ); 5 | -- ALTER TABLE 6 | -- Shops ADD PRIMARY KEY(id); 7 | -- ALTER TABLE 8 | -- Shops ADD CONSTRAINT shops_shop_name_unique UNIQUE(shop_name); 9 | -- CREATE TABLE Products( 10 | -- id SERIAL NOT NULL, 11 | -- product_name VARCHAR(255) NOT NULL, 12 | -- price DECIMAL(8, 2) NOT NULL, 13 | -- shop_id INTEGER NOT NULL, 14 | -- category_id INTEGER NOT NULL, 15 | -- customer_id INTEGER NULL 16 | -- ); 17 | -- ALTER TABLE 18 | -- Products ADD PRIMARY KEY(id); 19 | -- CREATE TABLE Customer( 20 | -- id SERIAL NOT NULL, 21 | -- full_name VARCHAR(255) NOT NULL, 22 | -- age INTEGER NOT NULL 23 | -- ); 24 | -- ALTER TABLE 25 | -- Customer ADD PRIMARY KEY(id); 26 | -- CREATE TABLE Category( 27 | -- id SERIAL NOT NULL, 28 | -- category_name VARCHAR(255) NOT NULL 29 | -- ); 30 | -- ALTER TABLE 31 | -- Category ADD PRIMARY KEY(id); 32 | -- ALTER TABLE 33 | -- Category ADD CONSTRAINT category_category_name_unique UNIQUE(category_name); 34 | -- ALTER TABLE 35 | -- Products ADD CONSTRAINT products_customer_id_foreign FOREIGN KEY(customer_id) REFERENCES Customer(id); 36 | -- ALTER TABLE 37 | -- Products ADD CONSTRAINT products_shop_id_foreign FOREIGN KEY(shop_id) REFERENCES Shops(id); 38 | -- ALTER TABLE 39 | -- Products ADD CONSTRAINT products_category_id_foreign FOREIGN KEY(category_id) REFERENCES Category(id); 40 | 41 | -- INSERT INTO Shops (shop_name) VALUES 42 | -- ('Fashion World'), 43 | -- ('Tech Haven'), 44 | -- ('Green Grocery'); 45 | 46 | -- INSERT INTO Products (product_name, price, shop_id, category_id, customer_id) VALUES 47 | -- ('Trendy T-shirt', 29.99, 4, 1, 1), 48 | -- ('Smartphone X', 599.99, 6, 2, 2), 49 | -- ('Organic Apples', 2.49, 5, 3, 3); 50 | 51 | -- INSERT INTO Customer (full_name, age) VALUES 52 | -- ('Emily Johnson', 30), 53 | -- ('Michael Brown', 25), 54 | -- ('Sophia Lee', 40); 55 | 56 | -- INSERT INTO Category (category_name) VALUES 57 | -- ('Clothing'), 58 | -- ('Electronics'), 59 | -- ('Groceries'); 60 | -------------------------------------------------------------------------------- /EntityCoreLessons/EntityCoreLesson/Controllers/CompanyController.cs: -------------------------------------------------------------------------------- 1 | using EntityCoreLesson.Application.MyServices.CompanyService; 2 | using EntityCoreLesson.Domain.DTOs; 3 | using EntityCoreLesson.Domain.Models; 4 | using Microsoft.AspNetCore.Http; 5 | using Microsoft.AspNetCore.Mvc; 6 | 7 | namespace EntityCoreLesson.Controllers 8 | { 9 | [Route("api/[controller]/[action]")] 10 | [ApiController] 11 | public class CompanyController : ControllerBase 12 | { 13 | public ICompanyService _comService; 14 | public CompanyController(ICompanyService comS) 15 | { 16 | _comService = comS; 17 | } 18 | [HttpPost] 19 | public async Task Create(CompanyDTO cmp) 20 | { 21 | try 22 | { 23 | return await _comService.CreateCompanyAsync(cmp); 24 | } 25 | catch 26 | { 27 | return "Error"; 28 | } 29 | } 30 | [HttpGet] 31 | public async Task> GetAllCompaniesAsync() 32 | { 33 | try 34 | { 35 | return await _comService.GetAllCompanysAsync(); 36 | } 37 | catch 38 | { 39 | return Enumerable.Empty(); 40 | } 41 | } 42 | [HttpGet] 43 | public async Task GetCompanyByIdAsync(int id) 44 | { 45 | try 46 | { 47 | return await _comService.GetCompanyByIdAsync(id); 48 | } 49 | catch 50 | { 51 | return new Company() { }; 52 | } 53 | } 54 | [HttpDelete] 55 | public async Task DeleteCompanyByIdAsync(int id) 56 | { 57 | try 58 | { 59 | return await _comService.DeleteCompanyByIdAsync(id); 60 | } 61 | catch 62 | { 63 | return false; 64 | } 65 | } 66 | [HttpPut] 67 | public async Task UpdateCompanyByIdAsync(int id,CompanyDTO company) 68 | { 69 | try 70 | { 71 | return await _comService.UpdateCompanyById(id, company); 72 | } 73 | catch 74 | { 75 | return false; 76 | } 77 | } 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /MarketplaceSolution/Online.Marketplace/MyServices/Services/ProductService.cs: -------------------------------------------------------------------------------- 1 | using Online.Marketplace.Entities.DTOs; 2 | using Online.Marketplace.Models; 3 | using Online.Marketplace.MyServices.IServices; 4 | using Online.Marketplace.Repository.ProductCRUd; 5 | 6 | namespace Online.Marketplace.MyServices.Services 7 | { 8 | public class ProductService : IProductService 9 | { 10 | private readonly IProductCRUD _productRepo; 11 | public ProductService(IProductCRUD repo) 12 | { 13 | _productRepo = repo; 14 | } 15 | public string Create(ProductDTO product) 16 | { 17 | if (product.Product_name == null || product.Product_name == "") 18 | { 19 | return "Service error name null error"; 20 | } 21 | return _productRepo.Create(product); 22 | } 23 | 24 | public string DeleteByID(int id) 25 | { 26 | if (id < 0) 27 | { 28 | return "Id should be greater or equal to 0"; 29 | } 30 | try 31 | { 32 | return _productRepo.DeleteByID(id); 33 | } 34 | catch 35 | { 36 | return "Error"; 37 | } 38 | } 39 | 40 | public IEnumerable GetAll() 41 | { 42 | try 43 | { 44 | return _productRepo.GetAll(); 45 | } 46 | catch 47 | { 48 | return Enumerable.Empty(); 49 | } 50 | } 51 | 52 | public Product GetByID(int id) 53 | { 54 | if (id < 0) 55 | { 56 | return new Product(); 57 | } 58 | try 59 | { 60 | return _productRepo.GetByID(id); 61 | } 62 | catch 63 | { 64 | return new Product(); 65 | } 66 | } 67 | 68 | public string Update(int id, ProductDTO product) 69 | { 70 | 71 | if (product.Product_name == null || product.Product_name == "") 72 | { 73 | return "Service error name null error"; 74 | } 75 | if (id < 0) 76 | { 77 | return "id should be greater or equal to 0"; 78 | } 79 | try 80 | { 81 | return _productRepo.Update(id, product); 82 | } 83 | catch 84 | { 85 | return "Error in services"; 86 | } 87 | 88 | } 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /MarketplaceSolution/Online.Marketplace/MyServices/Services/ShopService.cs: -------------------------------------------------------------------------------- 1 | using Online.Marketplace.Entities.DTOs; 2 | using Online.Marketplace.Models; 3 | using Online.Marketplace.MyServices.IServices; 4 | using Online.Marketplace.Repository.ShopCRUD; 5 | 6 | namespace Online.Marketplace.MyServices.Services 7 | { 8 | public class ShopService : IShopService 9 | { 10 | public IShopCRUD _shp; 11 | public ShopService(IShopCRUD shopCRUD) 12 | { 13 | _shp = shopCRUD; 14 | } 15 | public string Create(ShopsDTO shop) 16 | { 17 | if (shop.Shop_Name == null || shop.Shop_Name == "") 18 | { 19 | return "Service error name null error"; 20 | } 21 | try 22 | { 23 | return _shp.Create(shop); 24 | } 25 | catch 26 | { 27 | return "Error in service"; 28 | } 29 | } 30 | 31 | public string DeleteByID(int id) 32 | { 33 | if (id < 0) 34 | { 35 | return "Id should be greater then or equal to 0"; 36 | } 37 | try 38 | { 39 | return _shp.DeleteByID(id); 40 | } 41 | catch 42 | { 43 | return "Error in service"; 44 | } 45 | } 46 | 47 | public IEnumerable GetAll() 48 | { 49 | try 50 | { 51 | return _shp.GetAll(); 52 | } 53 | catch 54 | { 55 | return Enumerable.Empty(); 56 | } 57 | } 58 | 59 | public Shops GetByID(int id) 60 | { 61 | if (id < 0) 62 | { 63 | return new Shops(); 64 | } 65 | try 66 | { 67 | return _shp.GetByID(id); 68 | } 69 | catch 70 | { 71 | return new Shops(); 72 | } 73 | } 74 | 75 | public string Update(int id, ShopsDTO shop) 76 | { 77 | if (id < 0) 78 | { 79 | return "Id should be greater then or equal to 0"; 80 | } 81 | if (shop.Shop_Name == null || shop.Shop_Name == "") 82 | { 83 | return "Service error name null error"; 84 | } 85 | try 86 | { 87 | return _shp.Update(id, shop); 88 | } 89 | catch 90 | { 91 | return "Error in Services"; 92 | } 93 | } 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /MarketplaceSolution/Online.Marketplace/MyServices/Services/CategoryService.cs: -------------------------------------------------------------------------------- 1 | using Online.Marketplace.Entities.DTOs; 2 | using Online.Marketplace.Models; 3 | using Online.Marketplace.MyServices.IServices; 4 | using Online.Marketplace.Repository.CategoryCRUD; 5 | 6 | namespace Online.Marketplace.MyServices.Services 7 | { 8 | public class CategoryService : ICategoryService 9 | { 10 | public ICategoryCRUD _cr; 11 | public CategoryService(ICategoryCRUD cr) 12 | { 13 | _cr = cr; 14 | } 15 | 16 | public string Create(CategoryDTO category) 17 | { 18 | if (category.Category_name == null || category.Category_name == "") 19 | { 20 | return "Service error name is null"; 21 | } 22 | try 23 | { 24 | return _cr.Create(category); 25 | } 26 | catch 27 | { 28 | return "Error in service"; 29 | } 30 | 31 | } 32 | 33 | public string DeleteByID(int id) 34 | { 35 | if(id < 0) 36 | { 37 | return "Id should be greater than or equal to 0"; 38 | } 39 | try 40 | { 41 | return _cr.DeleteByID(id); 42 | } 43 | catch 44 | { 45 | return "Error in service"; 46 | } 47 | } 48 | 49 | public IEnumerable GetAll() 50 | { 51 | try 52 | { 53 | return _cr.GetAll(); 54 | } 55 | catch 56 | { 57 | return Enumerable.Empty(); 58 | } 59 | } 60 | 61 | public Category GetByID(int id) 62 | { 63 | if (id < 0) 64 | { 65 | return new Category(); 66 | } 67 | try 68 | { 69 | return _cr.GetByID(id); 70 | } 71 | catch 72 | { 73 | return new Category(); 74 | } 75 | } 76 | 77 | public string Update(int id, CategoryDTO category) 78 | { 79 | if (id < 0) 80 | { 81 | return "Id should be greater than or equal to 0"; 82 | } 83 | if (category.Category_name == null || category.Category_name == "") 84 | { 85 | return "Service error name is null"; 86 | } 87 | try 88 | { 89 | return _cr.Update(id, category); 90 | } 91 | catch 92 | { 93 | return "Error in service"; 94 | } 95 | } 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /MarketplaceSolution/Online.Marketplace/MyServices/Services/CustomerService.cs: -------------------------------------------------------------------------------- 1 | using Online.Marketplace.Entities.DTOs; 2 | using Online.Marketplace.Models; 3 | using Online.Marketplace.MyServices.IServices; 4 | using Online.Marketplace.Repository.CustomerCRUD; 5 | 6 | namespace Online.Marketplace.MyServices.Services 7 | { 8 | public class CustomerService : ICustomerService 9 | { 10 | public ICustomerCRUD _cs; 11 | 12 | public CustomerService(ICustomerCRUD cs) 13 | { 14 | _cs = cs; 15 | } 16 | public string Create(CustomersDTO customer) 17 | { 18 | if(customer.Full_Name == "" || customer.Full_Name == null) 19 | { 20 | return "Name isn't null"; 21 | } 22 | if(customer.Age > 11) 23 | { 24 | try 25 | { 26 | return _cs.Create(customer); 27 | } 28 | catch 29 | { 30 | return "Error in service"; 31 | } 32 | } 33 | else 34 | { 35 | return "You aren't old enough to be customer"; 36 | } 37 | } 38 | 39 | public string DeleteByID(int id) 40 | { 41 | if(id < 0) 42 | { 43 | return "Id should be greater than or equal to 0"; 44 | } 45 | try 46 | { 47 | return _cs.DeleteByID(id); 48 | } 49 | catch 50 | { 51 | return "Error in Service"; 52 | } 53 | } 54 | 55 | public IEnumerable GetAll() 56 | { 57 | try 58 | { 59 | return _cs.GetAll(); 60 | } 61 | catch 62 | { 63 | return Enumerable.Empty(); 64 | } 65 | } 66 | 67 | public Customers GetByID(int id) 68 | { 69 | if (id < 0) 70 | { 71 | return new Customers(); 72 | } 73 | try 74 | { 75 | return _cs.GetByID(id); 76 | } 77 | catch 78 | { 79 | return new Customers(); 80 | } 81 | } 82 | 83 | public string Update(int id, CustomersDTO customer) 84 | { 85 | if (id < 0) 86 | { 87 | return "Id should be greater than or equal to 0"; 88 | } 89 | if (customer.Full_Name == "" || customer.Full_Name == null) 90 | { 91 | return "Name isn't null"; 92 | } 93 | if(customer.Age > 11) 94 | { 95 | try 96 | { 97 | return _cs.Update(id, customer); 98 | } 99 | catch 100 | { 101 | return "Error in Service"; 102 | } 103 | } 104 | else 105 | { 106 | return "The age is small"; 107 | } 108 | } 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /EntityCoreLessons/EntityCoreLesson/Application/MyServices/CompanyService/CompanyService.cs: -------------------------------------------------------------------------------- 1 | using EntityCoreLesson.Domain.DTOs; 2 | using EntityCoreLesson.Domain.Models; 3 | using EntityCoreLesson.Infastructure; 4 | using Microsoft.EntityFrameworkCore; 5 | 6 | namespace EntityCoreLesson.Application.MyServices.CompanyService 7 | { 8 | public class CompanyService : ICompanyService 9 | { 10 | public ApplicationDbContext _context; 11 | public CompanyService(ApplicationDbContext context) 12 | { 13 | _context = context; 14 | } 15 | public async Task CreateCompanyAsync(CompanyDTO cmp) 16 | { 17 | try 18 | { 19 | var model = new Company() 20 | { 21 | Name = cmp.Name, 22 | Description = cmp.Description, 23 | Employee_count = cmp.Employee_count, 24 | }; 25 | await _context.Companys.AddAsync(model); 26 | _context.SaveChanges(); 27 | return "Yaratildi"; 28 | } 29 | catch 30 | { 31 | return "Error"; 32 | } 33 | } 34 | 35 | public async Task DeleteCompanyByIdAsync(int id) 36 | { 37 | try 38 | { 39 | var md = await _context.Companys.FirstOrDefaultAsync(x => x.Id == id); 40 | if (md != null) 41 | { 42 | _context.Companys.Remove(md); 43 | _context.SaveChanges(); 44 | return true; 45 | } 46 | return false; 47 | } 48 | catch 49 | { 50 | return false; 51 | } 52 | } 53 | 54 | public async Task> GetAllCompanysAsync() 55 | { 56 | try 57 | { 58 | var x = await _context.Companys.ToListAsync(); 59 | return x; 60 | } 61 | catch 62 | { 63 | return Enumerable.Empty(); 64 | } 65 | } 66 | 67 | public async Task GetCompanyByIdAsync(int id) 68 | { 69 | try 70 | { 71 | var md = await _context.Companys.FirstOrDefaultAsync(x => x.Id == id); 72 | if (md != null) 73 | { 74 | return md; 75 | } 76 | return new Company() { }; 77 | } 78 | catch 79 | { 80 | return new Company() { }; 81 | } 82 | } 83 | 84 | public async Task UpdateCompanyById(int id, CompanyDTO company) 85 | { 86 | try 87 | { 88 | var md = await _context.Companys.FirstOrDefaultAsync(x => x.Id == id); 89 | if (md != null) 90 | { 91 | md.Name = company.Name; 92 | md.Description = company.Description; 93 | _context.SaveChanges(); 94 | return true; 95 | } 96 | return false; 97 | } 98 | catch 99 | { 100 | return false; 101 | } 102 | } 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /MarketplaceSolution/Online.Marketplace/Repository/ShopCRUD/ShopCRUD.cs: -------------------------------------------------------------------------------- 1 | using Dapper; 2 | using Npgsql; 3 | using Online.Marketplace.Entities.DTOs; 4 | using Online.Marketplace.Models; 5 | 6 | namespace Online.Marketplace.Repository.ShopCRUD 7 | { 8 | public class ShopCRUD : IShopCRUD 9 | { 10 | public IConfiguration _config; 11 | public ShopCRUD(IConfiguration config) 12 | { 13 | _config = config; 14 | } 15 | public string Create(ShopsDTO shop) 16 | { 17 | try 18 | { 19 | using (NpgsqlConnection con = new NpgsqlConnection(_config.GetConnectionString("Postgres"))) 20 | { 21 | string query = "insert into Shops(shop_name) " + 22 | "values(@Shop_Name);"; 23 | 24 | ShopsDTO? parameters = new ShopsDTO 25 | { 26 | Shop_Name = shop.Shop_Name, 27 | }; 28 | 29 | con.Execute(query, parameters); 30 | 31 | return "Succesfully"; 32 | } 33 | } 34 | catch 35 | { 36 | return "ERROR"; 37 | } 38 | } 39 | 40 | public string DeleteByID(int id) 41 | { 42 | try 43 | { 44 | using (NpgsqlConnection con = new NpgsqlConnection(_config.GetConnectionString("Postgres"))) 45 | { 46 | string query = "delete from shops where id = @aydi"; 47 | 48 | con.Execute(query, new { aydi = id }); 49 | 50 | return "Succesfully"; 51 | } 52 | } 53 | catch 54 | { 55 | return "ERROR"; 56 | } 57 | } 58 | 59 | public IEnumerable GetAll() 60 | { 61 | try 62 | { 63 | 64 | using (NpgsqlConnection con = new NpgsqlConnection(_config.GetConnectionString("Postgres"))) 65 | { 66 | string query = "select * from shops"; 67 | 68 | IEnumerable? responce = con.Query(query); 69 | 70 | return responce; 71 | } 72 | } 73 | catch 74 | { 75 | return Enumerable.Empty(); 76 | } 77 | 78 | } 79 | 80 | public Shops GetByID(int id) 81 | { 82 | try 83 | { 84 | 85 | using (NpgsqlConnection con = new NpgsqlConnection(_config.GetConnectionString("Postgres"))) 86 | { 87 | string query = "select * from shops where id = @aydi"; 88 | 89 | List? responce = con.Query(query, new { aydi = id }).ToList(); 90 | 91 | return responce[0]; 92 | } 93 | } 94 | catch 95 | { 96 | return new Shops() { }; 97 | } 98 | } 99 | 100 | public string Update(int id, ShopsDTO shops) 101 | { 102 | try 103 | { 104 | using (NpgsqlConnection con = new NpgsqlConnection(_config.GetConnectionString("Postgres"))) 105 | { 106 | string query = "update shops set shop_name=@shop_name where id = @aydi"; 107 | 108 | con.Execute(query, new 109 | { 110 | shop_name = shops.Shop_Name, 111 | aydi = id 112 | }); 113 | 114 | return "Succesfully"; 115 | } 116 | } 117 | catch 118 | { 119 | return "ERROR"; 120 | } 121 | } 122 | } 123 | } 124 | -------------------------------------------------------------------------------- /MarketplaceSolution/Online.Marketplace/Repository/CategoryCRUD/CategoryCRUD.cs: -------------------------------------------------------------------------------- 1 | using Dapper; 2 | using Npgsql; 3 | using Online.Marketplace.Entities.DTOs; 4 | using Online.Marketplace.Models; 5 | 6 | namespace Online.Marketplace.Repository.CategoryCRUD 7 | { 8 | public class CategoryCRUD : ICategoryCRUD 9 | { 10 | public IConfiguration _config; 11 | public CategoryCRUD(IConfiguration config) 12 | { 13 | _config = config; 14 | } 15 | public string Create(CategoryDTO category) 16 | { 17 | try 18 | { 19 | using (NpgsqlConnection con = new NpgsqlConnection(_config.GetConnectionString("Postgres"))) 20 | { 21 | string query = "insert into category(category_name) " + 22 | "values(@Category_name);"; 23 | 24 | var parameters = new CategoryDTO 25 | { 26 | Category_name = category.Category_name 27 | }; 28 | 29 | con.Execute(query, parameters); 30 | 31 | return "Succesfully"; 32 | } 33 | } 34 | catch 35 | { 36 | return "ERROR"; 37 | } 38 | } 39 | 40 | public string DeleteByID(int id) 41 | { 42 | try 43 | { 44 | using (NpgsqlConnection con = new NpgsqlConnection(_config.GetConnectionString("Postgres"))) 45 | { 46 | string query = "delete from category where id = @aydi"; 47 | 48 | con.Execute(query, new { aydi = id }); 49 | 50 | return "Succesfully"; 51 | } 52 | } 53 | catch 54 | { 55 | return "ERROR or Relation "; 56 | } 57 | } 58 | 59 | public IEnumerable GetAll() 60 | { 61 | try 62 | { 63 | 64 | using (NpgsqlConnection con = new NpgsqlConnection(_config.GetConnectionString("Postgres"))) 65 | { 66 | string query = "select * from category;"; 67 | 68 | var responce = con.Query(query); 69 | 70 | return responce; 71 | } 72 | } 73 | catch 74 | { 75 | return Enumerable.Empty(); 76 | } 77 | } 78 | 79 | public Category GetByID(int id) 80 | { 81 | try 82 | { 83 | using (NpgsqlConnection con = new NpgsqlConnection(_config.GetConnectionString("Postgres"))) 84 | { 85 | string query = "select * from category where id = @aydi"; 86 | 87 | var responce = con.Query(query, new { aydi = id }).ToList(); 88 | 89 | return responce[0]; 90 | } 91 | } 92 | catch 93 | { 94 | return new Category() { }; 95 | } 96 | } 97 | 98 | public string Update(int id, CategoryDTO category) 99 | { 100 | try 101 | { 102 | using (NpgsqlConnection con = new NpgsqlConnection(_config.GetConnectionString("Postgres"))) 103 | { 104 | string query = "update category set category_name = @name where id = @aydi"; 105 | 106 | con.Execute(query, new 107 | { 108 | name = category.Category_name, 109 | aydi = id 110 | }); 111 | 112 | return "Succesfully"; 113 | } 114 | } 115 | catch 116 | { 117 | return "ERROR"; 118 | } 119 | } 120 | } 121 | } 122 | -------------------------------------------------------------------------------- /MarketplaceSolution/Online.Marketplace/Repository/CustomerCRUD/CustomerCRUD.cs: -------------------------------------------------------------------------------- 1 | using Dapper; 2 | using Npgsql; 3 | using Online.Marketplace.Entities.DTOs; 4 | using Online.Marketplace.Models; 5 | 6 | namespace Online.Marketplace.Repository.CustomerCRUD 7 | { 8 | public class CustomerCRUD : ICustomerCRUD 9 | { 10 | public IConfiguration _config; 11 | public CustomerCRUD(IConfiguration config) 12 | { 13 | _config = config; 14 | } 15 | public string Create(CustomersDTO customer) 16 | { 17 | try 18 | { 19 | using (NpgsqlConnection con = new NpgsqlConnection(_config.GetConnectionString("Postgres"))) 20 | { 21 | string query = "insert into customer(full_name,age) " + 22 | "values(@full_name,@age);"; 23 | 24 | CustomersDTO? parameters = new CustomersDTO 25 | { 26 | Full_Name = customer.Full_Name, 27 | Age = customer.Age 28 | }; 29 | 30 | con.Execute(query, parameters); 31 | 32 | return "Succesfully"; 33 | } 34 | } 35 | catch 36 | { 37 | return "ERROR"; 38 | } 39 | } 40 | 41 | public string DeleteByID(int id) 42 | { 43 | try 44 | { 45 | using (NpgsqlConnection con = new NpgsqlConnection(_config.GetConnectionString("Postgres"))) 46 | { 47 | string query = "delete from customer where id = @aydi"; 48 | 49 | con.Execute(query, new { aydi = id }); 50 | 51 | return "Succesfully"; 52 | } 53 | } 54 | catch 55 | { 56 | return "ERROR"; 57 | } 58 | } 59 | 60 | public IEnumerable GetAll() 61 | { 62 | try 63 | { 64 | 65 | using (NpgsqlConnection con = new NpgsqlConnection(_config.GetConnectionString("Postgres"))) 66 | { 67 | string query = "select * from customer"; 68 | 69 | IEnumerable? responce = con.Query(query); 70 | 71 | return responce; 72 | } 73 | } 74 | catch 75 | { 76 | return Enumerable.Empty(); 77 | } 78 | } 79 | 80 | public Customers GetByID(int id) 81 | { 82 | try 83 | { 84 | 85 | using (NpgsqlConnection con = new NpgsqlConnection(_config.GetConnectionString("Postgres"))) 86 | { 87 | string query = "select * from customer where id = @aydi"; 88 | 89 | List? responce = con.Query(query, new { aydi = id }).ToList(); 90 | 91 | return responce[0]; 92 | } 93 | } 94 | catch 95 | { 96 | return new Customers() { }; 97 | } 98 | } 99 | 100 | public string Update(int id, CustomersDTO customer) 101 | { 102 | try 103 | { 104 | using (NpgsqlConnection con = new NpgsqlConnection(_config.GetConnectionString("Postgres"))) 105 | { 106 | string query = "update customer set full_name = @full_name,age=@age where id = @aydi"; 107 | 108 | con.Execute(query, new 109 | { 110 | full_name = customer.Full_Name, 111 | age = customer.Age, 112 | aydi = id 113 | }); 114 | 115 | return "Succesfully"; 116 | } 117 | } 118 | catch 119 | { 120 | return "ERROR"; 121 | } 122 | } 123 | } 124 | } 125 | -------------------------------------------------------------------------------- /MarketplaceSolution/Online.Marketplace/Repository/ProductCRUd/ProductCRUD.cs: -------------------------------------------------------------------------------- 1 | using Online.Marketplace.Entities.DTOs; 2 | using Online.Marketplace.Models; 3 | using Dapper; 4 | using Npgsql; 5 | 6 | namespace Online.Marketplace.Repository.ProductCRUd 7 | { 8 | public class ProductCRUD : IProductCRUD 9 | { 10 | public IConfiguration _config; 11 | public ProductCRUD(IConfiguration config) 12 | { 13 | _config = config; 14 | } 15 | public string Create(ProductDTO product) 16 | { 17 | try 18 | { 19 | using (NpgsqlConnection con = new NpgsqlConnection(_config.GetConnectionString("Postgres"))) 20 | { 21 | string query = "insert into products(product_name,price,shop_id,category_id,customer_id) " + 22 | "values(@Product_name,@Price,@Shop_id,@Category_id,@Customer_id);"; 23 | 24 | var parameters = new ProductDTO 25 | { 26 | Product_name = product.Product_name, 27 | Price = product.Price, 28 | Shop_id = product.Shop_id, 29 | Category_id = product.Category_id, 30 | Customer_id = product.Customer_id 31 | }; 32 | 33 | con.Execute(query, parameters); 34 | 35 | return "Succesfully"; 36 | } 37 | } 38 | catch 39 | { 40 | return "ERROR"; 41 | } 42 | } 43 | 44 | public string DeleteByID(int id) 45 | { 46 | try 47 | { 48 | using (NpgsqlConnection con = new NpgsqlConnection(_config.GetConnectionString("Postgres"))) 49 | { 50 | string query = "delete from products where id = @aydi"; 51 | 52 | con.Execute(query, new { aydi = id }); 53 | 54 | return "Succesfully"; 55 | } 56 | } 57 | catch 58 | { 59 | return "This id isn't exists"; 60 | } 61 | } 62 | 63 | public IEnumerable GetAll() 64 | { 65 | try 66 | { 67 | 68 | using (NpgsqlConnection con = new NpgsqlConnection(_config.GetConnectionString("Postgres"))) 69 | { 70 | string query = "select * from products"; 71 | 72 | var responce = con.Query(query); 73 | 74 | return responce; 75 | } 76 | } 77 | catch 78 | { 79 | return Enumerable.Empty(); 80 | } 81 | } 82 | 83 | public Product GetByID(int id) 84 | { 85 | try 86 | { 87 | 88 | using (NpgsqlConnection con = new NpgsqlConnection(_config.GetConnectionString("Postgres"))) 89 | { 90 | string query = "select * from products where id = @aydi"; 91 | 92 | var responce = con.Query(query, new { aydi = id }).ToList(); 93 | 94 | return responce[0]; 95 | } 96 | } 97 | catch 98 | { 99 | return new Product() { }; 100 | } 101 | } 102 | 103 | public string Update(int id, ProductDTO product) 104 | { 105 | try 106 | { 107 | using (NpgsqlConnection con = new NpgsqlConnection(_config.GetConnectionString("Postgres"))) 108 | { 109 | string query = "update products set product_name = @name,price = @pr,shop_id = @shp_id,category_id = @ct_id,customer_id = @cs_id where id = @aydi"; 110 | 111 | con.Execute(query, new 112 | { 113 | name = product.Product_name, 114 | pr = product.Price, 115 | shp_id = product.Shop_id, 116 | ct_id = product.Category_id, 117 | cs_id = product.Customer_id, 118 | aydi = id 119 | }); 120 | 121 | return "Succesfully"; 122 | } 123 | } 124 | catch 125 | { 126 | return "ERROR"; 127 | } 128 | } 129 | 130 | } 131 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Ww][Ii][Nn]32/ 27 | [Aa][Rr][Mm]/ 28 | [Aa][Rr][Mm]64/ 29 | bld/ 30 | [Bb]in/ 31 | [Oo]bj/ 32 | [Ll]og/ 33 | [Ll]ogs/ 34 | 35 | # Visual Studio 2015/2017 cache/options directory 36 | .vs/ 37 | # Uncomment if you have tasks that create the project's static files in wwwroot 38 | #wwwroot/ 39 | 40 | # Visual Studio 2017 auto generated files 41 | Generated\ Files/ 42 | 43 | # MSTest test Results 44 | [Tt]est[Rr]esult*/ 45 | [Bb]uild[Ll]og.* 46 | 47 | # NUnit 48 | *.VisualState.xml 49 | TestResult.xml 50 | nunit-*.xml 51 | 52 | # Build Results of an ATL Project 53 | [Dd]ebugPS/ 54 | [Rr]eleasePS/ 55 | dlldata.c 56 | 57 | # Benchmark Results 58 | BenchmarkDotNet.Artifacts/ 59 | 60 | # .NET Core 61 | project.lock.json 62 | project.fragment.lock.json 63 | artifacts/ 64 | 65 | # ASP.NET Scaffolding 66 | ScaffoldingReadMe.txt 67 | 68 | # StyleCop 69 | StyleCopReport.xml 70 | 71 | # Files built by Visual Studio 72 | *_i.c 73 | *_p.c 74 | *_h.h 75 | *.ilk 76 | *.meta 77 | *.obj 78 | *.iobj 79 | *.pch 80 | *.pdb 81 | *.ipdb 82 | *.pgc 83 | *.pgd 84 | *.rsp 85 | *.sbr 86 | *.tlb 87 | *.tli 88 | *.tlh 89 | *.tmp 90 | *.tmp_proj 91 | *_wpftmp.csproj 92 | *.log 93 | *.tlog 94 | *.vspscc 95 | *.vssscc 96 | .builds 97 | *.pidb 98 | *.svclog 99 | *.scc 100 | 101 | # Chutzpah Test files 102 | _Chutzpah* 103 | 104 | # Visual C++ cache files 105 | ipch/ 106 | *.aps 107 | *.ncb 108 | *.opendb 109 | *.opensdf 110 | *.sdf 111 | *.cachefile 112 | *.VC.db 113 | *.VC.VC.opendb 114 | 115 | # Visual Studio profiler 116 | *.psess 117 | *.vsp 118 | *.vspx 119 | *.sap 120 | 121 | # Visual Studio Trace Files 122 | *.e2e 123 | 124 | # TFS 2012 Local Workspace 125 | $tf/ 126 | 127 | # Guidance Automation Toolkit 128 | *.gpState 129 | 130 | # ReSharper is a .NET coding add-in 131 | _ReSharper*/ 132 | *.[Rr]e[Ss]harper 133 | *.DotSettings.user 134 | 135 | # TeamCity is a build add-in 136 | _TeamCity* 137 | 138 | # DotCover is a Code Coverage Tool 139 | *.dotCover 140 | 141 | # AxoCover is a Code Coverage Tool 142 | .axoCover/* 143 | !.axoCover/settings.json 144 | 145 | # Coverlet is a free, cross platform Code Coverage Tool 146 | coverage*.json 147 | coverage*.xml 148 | coverage*.info 149 | 150 | # Visual Studio code coverage results 151 | *.coverage 152 | *.coveragexml 153 | 154 | # NCrunch 155 | _NCrunch_* 156 | .*crunch*.local.xml 157 | nCrunchTemp_* 158 | 159 | # MightyMoose 160 | *.mm.* 161 | AutoTest.Net/ 162 | 163 | # Web workbench (sass) 164 | .sass-cache/ 165 | 166 | # Installshield output folder 167 | [Ee]xpress/ 168 | 169 | # DocProject is a documentation generator add-in 170 | DocProject/buildhelp/ 171 | DocProject/Help/*.HxT 172 | DocProject/Help/*.HxC 173 | DocProject/Help/*.hhc 174 | DocProject/Help/*.hhk 175 | DocProject/Help/*.hhp 176 | DocProject/Help/Html2 177 | DocProject/Help/html 178 | 179 | # Click-Once directory 180 | publish/ 181 | 182 | # Publish Web Output 183 | *.[Pp]ublish.xml 184 | *.azurePubxml 185 | # Note: Comment the next line if you want to checkin your web deploy settings, 186 | # but database connection strings (with potential passwords) will be unencrypted 187 | *.pubxml 188 | *.publishproj 189 | 190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 191 | # checkin your Azure Web App publish settings, but sensitive information contained 192 | # in these scripts will be unencrypted 193 | PublishScripts/ 194 | 195 | # NuGet Packages 196 | *.nupkg 197 | # NuGet Symbol Packages 198 | *.snupkg 199 | # The packages folder can be ignored because of Package Restore 200 | **/[Pp]ackages/* 201 | # except build/, which is used as an MSBuild target. 202 | !**/[Pp]ackages/build/ 203 | # Uncomment if necessary however generally it will be regenerated when needed 204 | #!**/[Pp]ackages/repositories.config 205 | # NuGet v3's project.json files produces more ignorable files 206 | *.nuget.props 207 | *.nuget.targets 208 | 209 | # Microsoft Azure Build Output 210 | csx/ 211 | *.build.csdef 212 | 213 | # Microsoft Azure Emulator 214 | ecf/ 215 | rcf/ 216 | 217 | # Windows Store app package directories and files 218 | AppPackages/ 219 | BundleArtifacts/ 220 | Package.StoreAssociation.xml 221 | _pkginfo.txt 222 | *.appx 223 | *.appxbundle 224 | *.appxupload 225 | 226 | # Visual Studio cache files 227 | # files ending in .cache can be ignored 228 | *.[Cc]ache 229 | # but keep track of directories ending in .cache 230 | !?*.[Cc]ache/ 231 | 232 | # Others 233 | ClientBin/ 234 | ~$* 235 | *~ 236 | *.dbmdl 237 | *.dbproj.schemaview 238 | *.jfm 239 | *.pfx 240 | *.publishsettings 241 | orleans.codegen.cs 242 | 243 | # Including strong name files can present a security risk 244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 245 | #*.snk 246 | 247 | # Since there are multiple workflows, uncomment next line to ignore bower_components 248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 249 | #bower_components/ 250 | 251 | # RIA/Silverlight projects 252 | Generated_Code/ 253 | 254 | # Backup & report files from converting an old project file 255 | # to a newer Visual Studio version. Backup files are not needed, 256 | # because we have git ;-) 257 | _UpgradeReport_Files/ 258 | Backup*/ 259 | UpgradeLog*.XML 260 | UpgradeLog*.htm 261 | ServiceFabricBackup/ 262 | *.rptproj.bak 263 | 264 | # SQL Server files 265 | *.mdf 266 | *.ldf 267 | *.ndf 268 | 269 | # Business Intelligence projects 270 | *.rdl.data 271 | *.bim.layout 272 | *.bim_*.settings 273 | *.rptproj.rsuser 274 | *- [Bb]ackup.rdl 275 | *- [Bb]ackup ([0-9]).rdl 276 | *- [Bb]ackup ([0-9][0-9]).rdl 277 | 278 | # Microsoft Fakes 279 | FakesAssemblies/ 280 | 281 | # GhostDoc plugin setting file 282 | *.GhostDoc.xml 283 | 284 | # Node.js Tools for Visual Studio 285 | .ntvs_analysis.dat 286 | node_modules/ 287 | 288 | # Visual Studio 6 build log 289 | *.plg 290 | 291 | # Visual Studio 6 workspace options file 292 | *.opt 293 | 294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 295 | *.vbw 296 | 297 | # Visual Studio 6 auto-generated project file (contains which files were open etc.) 298 | *.vbp 299 | 300 | # Visual Studio 6 workspace and project file (working project files containing files to include in project) 301 | *.dsw 302 | *.dsp 303 | 304 | # Visual Studio 6 technical files 305 | *.ncb 306 | *.aps 307 | 308 | # Visual Studio LightSwitch build output 309 | **/*.HTMLClient/GeneratedArtifacts 310 | **/*.DesktopClient/GeneratedArtifacts 311 | **/*.DesktopClient/ModelManifest.xml 312 | **/*.Server/GeneratedArtifacts 313 | **/*.Server/ModelManifest.xml 314 | _Pvt_Extensions 315 | 316 | # Paket dependency manager 317 | .paket/paket.exe 318 | paket-files/ 319 | 320 | # FAKE - F# Make 321 | .fake/ 322 | 323 | # CodeRush personal settings 324 | .cr/personal 325 | 326 | # Python Tools for Visual Studio (PTVS) 327 | __pycache__/ 328 | *.pyc 329 | 330 | # Cake - Uncomment if you are using it 331 | # tools/** 332 | # !tools/packages.config 333 | 334 | # Tabs Studio 335 | *.tss 336 | 337 | # Telerik's JustMock configuration file 338 | *.jmconfig 339 | 340 | # BizTalk build output 341 | *.btp.cs 342 | *.btm.cs 343 | *.odx.cs 344 | *.xsd.cs 345 | 346 | # OpenCover UI analysis results 347 | OpenCover/ 348 | 349 | # Azure Stream Analytics local run output 350 | ASALocalRun/ 351 | 352 | # MSBuild Binary and Structured Log 353 | *.binlog 354 | 355 | # NVidia Nsight GPU debugger configuration file 356 | *.nvuser 357 | 358 | # MFractors (Xamarin productivity tool) working folder 359 | .mfractor/ 360 | 361 | # Local History for Visual Studio 362 | .localhistory/ 363 | 364 | # Visual Studio History (VSHistory) files 365 | .vshistory/ 366 | 367 | # BeatPulse healthcheck temp database 368 | healthchecksdb 369 | 370 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 371 | MigrationBackup/ 372 | 373 | # Ionide (cross platform F# VS Code tools) working folder 374 | .ionide/ 375 | 376 | # Fody - auto-generated XML schema 377 | FodyWeavers.xsd 378 | 379 | # VS Code files for those working on multiple tools 380 | .vscode/* 381 | !.vscode/settings.json 382 | !.vscode/tasks.json 383 | !.vscode/launch.json 384 | !.vscode/extensions.json 385 | *.code-workspace 386 | 387 | # Local History for Visual Studio Code 388 | .history/ 389 | 390 | # Windows Installer files from build outputs 391 | *.cab 392 | *.msi 393 | *.msix 394 | *.msm 395 | *.msp 396 | 397 | # JetBrains Rider 398 | *.sln.iml 399 | --------------------------------------------------------------------------------