text:
# RentaCarProject

## English Below ##

RentaCarProject, SOLID prensiplerine bağlı kalınarak ve N-Katmalı mimari yapısıyla C# programlama diline ait; henüz geliştirilme aşamasında olan bir araç kiralama projesidir. Şu anda projenin back-end kısmını incelemektesiniz.

***:link:Projenin front-end kısmına [buradan](https://github.com/hlmclgl/RentaCarProject-Frontend) ulaşabilirsiniz.***

Veritabanı, Visual Studio 2019 içindeki SQL Server Object Explorer kısmından yola çıkılarak oluşturulmuştur. Alt kısımda bu veritabanına ait bazı tabloların alan isimlerini ve veri tiplerini görebilirsiniz.

:open_file_folder:[Database](https://github.com/hlmclgl/RentaCarProject/tree/master/DB)

RentaCarProject; Entities, DataAccess ve Business katmanlarından oluşmaktadır. Başlangıç olarak bu katmanlardaki operasyonların simülasyonu için ConsoleUI katmanı kullanılmıştır. Daha sonrasında ise projede WebAPI yapılandırmasıyla beraber operasyonların testi için Postman kullanılmaya başlanılmıştır. Bu katmanları yakından inceleyelim:

## Entities Layer ##
Bu katman veritabanı nesneleri için oluşturulmuştur. Concrete klasöründe sadace tablolar için oluştrulmuş 'Class'lar bulunurken DTOs klasör kısmında ise farklı tablolardaki özellikleri birleştirmek amacıyla oluşturulan 'Class'lara yer verilmiştir. Alt kısımdaki bağlantıları kullanarak detayları inceleyebilirsiniz.

:open_file_folder:[Concrete](https://github.com/hlmclgl/RentaCarProject/tree/master/Entities/Concrete)

- :page_facing_up:[Brand](https://github.com/hlmclgl/RentaCarProject/blob/master/Entities/Concrete/Brand.cs)

- :page_facing_up:[Car](https://github.com/hlmclgl/RentaCarProject/blob/master/Entities/Concrete/Car.cs)

- :page_facing_up:[CarImage](https://github.com/hlmclgl/RentaCarProject/blob/master/Entities/Concrete/CarImage.cs)

- :page_facing_up:[Color](https://github.com/hlmclgl/RentaCarProject/blob/master/Entities/Concrete/Color.cs)

- :page_facing_up:[CreditCard](https://github.com/hlmclgl/RentaCarProject/blob/master/Entities/Concrete/CreditCard.cs)

- :page_facing_up:[Customer](https://github.com/hlmclgl/RentaCarProject/blob/master/Entities/Concrete/Customer.cs)

- :page_facing_up:[CustomerFindexScore](https://github.com/hlmclgl/RentaCarProject/blob/master/Entities/Concrete/CustomerFindeksScore.cs)

- :page_facing_up:[PaymentTest](https://github.com/hlmclgl/RentaCarProject/blob/master/Entities/Concrete/PaymentTest.cs)

- :page_facing_up:[Rental](https://github.com/hlmclgl/RentaCarProject/blob/master/Entities/Concrete/Rental.cs)

:open_file_folder:[Dto's](https://github.com/hlmclgl/RentaCarProject/tree/master/Entities/DTO's)

- :page_facing_up:[CarDetailDto](https://github.com/hlmclgl/RentaCarProject/blob/master/Entities/DTO's/CarDetailDto.cs)

- :page_facing_up:[CarImageDto](https://github.com/hlmclgl/RentaCarProject/blob/master/Entities/DTO's/CarImageDto.cs)

- :page_facing_up:[CustomerDetailDto](https://github.com/hlmclgl/RentaCarProject/blob/master/Entities/DTO's/CustomerDetailDto.cs)

- :page_facing_up:[RentalDetailDto](https://github.com/hlmclgl/RentaCarProject/blob/master/Entities/DTO's/RentalDetailDto.cs)

- :page_facing_up:[UserDetailDto](https://github.com/hlmclgl/RentaCarProject/blob/master/Entities/DTO's/UserDetailDto.cs)

- :page_facing_up:[UserForLoginDto](https://github.com/hlmclgl/RentaCarProject/blob/master/Entities/DTO's/UserForLoginDto.cs)

- :page_facing_up:[UserForRegisterDto](https://github.com/hlmclgl/RentaCarProject/blob/master/Entities/DTO's/UserForRegisterDto.cs)

- :page_facing_up:[UserForUpdateDto](https://github.com/hlmclgl/RentaCarProject/blob/master/Entities/DTO's/UserForUpdateDto.cs)

## Data Access Layer ##

Veritabanı ile ilgili gerçekleşen operasyonlar ve veritabanı bağlantıları bu katmanda yer almaktadır. Alt kısımdaki bağlantıları kullanarak detayları inceleyebilirsiniz.

:package: **NuGet Packages**

- :pushpin: Microsoft.EntityFrameworkCore.SqlServer(v3.1.11)

:open_file_folder:[Abstract](https://github.com/hlmclgl/RentaCarProject/tree/master/DataAccess/Abstract)

- :page_facing_up:[IBrandDal](https://github.com/hlmclgl/RentaCarProject/blob/master/DataAccess/Abstract/IBrandDal.cs)

- :page_facing_up:[ICarDal](https://github.com/hlmclgl/RentaCarProject/blob/master/DataAccess/Abstract/ICarDal.cs)

- :page_facing_up:[ICarImageDal](https://github.com/hlmclgl/RentaCarProject/blob/master/DataAccess/Abstract/ICarImageDal.cs)

- :page_facing_up:[IColorDal](https://github.com/hlmclgl/RentaCarProject/blob/master/DataAccess/Abstract/IColorDal.cs)

- :page_facing_up:[ICreditCardDal](https://github.com/hlmclgl/RentaCarProject/blob/master/DataAccess/Abstract/ICreditCardDal.cs)

- :page_facing_up:[ICustomerDal](https://github.com/hlmclgl/RentaCarProject/blob/master/DataAccess/Abstract/ICustomerDal.cs)

- :page_facing_up:[ICustomerFindeksScoreDal](https://github.com/hlmclgl/RentaCarProject/blob/master/DataAccess/Abstract/ICustomerFindeksScoreDal.cs)

- :page_facing_up:[IRentaCarDal](https://github.com/hlmclgl/RentaCarProject/blob/master/DataAccess/Abstract/IRentACarDal.cs)

- :page_facing_up:[IUserDal](https://github.com/hlmclgl/RentaCarProject/blob/master/DataAccess/Abstract/IUserDal.cs)

:open_file_folder:[Concrete](https://github.com/hlmclgl/RentaCarProject/tree/master/DataAccess/Concrete)

- :open_file_folder:[Entity Framework](https://github.com/hlmclgl/RentaCarProject/tree/master/DataAccess/Concrete/EntityFramework)

  - :page_facing_up:[EfBrandDal](https://github.com/hlmclgl/RentaCarProject/blob/master/DataAccess/Concrete/EntityFramework/EfBrandDal.cs)

  - :page_facing_up:[EfCarDal](https://github.com/hlmclgl/RentaCarProject/blob/master/DataAccess/Concrete/EntityFramework/EfCarDal.cs)

  - :page_facing_up:[EfCarImageDal](https://github.com/hlmclgl/RentaCarProject/blob/master/DataAccess/Concrete/EntityFramework/EfCarImageDal.cs)

  - :page_facing_up:[EfColorDal](https://github.com/hlmclgl/RentaCarProject/blob/master/DataAccess/Concrete/EntityFramework/EfColorDal.cs)

  - :page_facing_up:[EfCreditCardDal](https://github.com/hlmclgl/RentaCarProject/blob/master/DataAccess/Concrete/EntityFramework/EfCreditCardDal.cs)

  - :page_facing_up:[EfCustomerDal](https://github.com/hlmclgl/RentaCarProject/blob/master/DataAccess/Concrete/EntityFramework/EfCustomerDal.cs)

  - :page_facing_up:[EfCustomerFindeksScoreDal](https://github.com/hlmclgl/RentaCarProject/blob/master/DataAccess/Concrete/EntityFramework/EfCustomerFindeksScoreDal.cs)

  - :page_facing_up:[EfRentaCarDal](https://github.com/hlmclgl/RentaCarProject/blob/master/DataAccess/Concrete/EntityFramework/EfRentACarDal.cs)

  - :page_facing_up:[EfUserDal](https://github.com/hlmclgl/RentaCarProject/blob/master/DataAccess/Concrete/EntityFramework/EfUserDal.cs)

  - :page_facing_up:[RentaCarContext](https://github.com/hlmclgl/RentaCarProject/blob/master/DataAccess/Concrete/EntityFramework/RentaCarContext.cs)

:link:InMemory klasörü içindekiler veritabanıyla bir bağlantısı olmayıp sadace başlangıç için test amacıyla oluşturulmuştur.

## Business Layer ##

DataAcess katmanında yer alan operasyonlara ait iş kuralları bu katmanda yer almıştır. Alt kısımdaki bağlantıları kullanarak detayları inceleyebilirsiniz.

:package:**NuGet Packages**

- :pushpin:Autofac(v6.1.0)

- :pushpin:Autofac.Extras.DynamicProxy(v6.0.0)

- :pushpin:FluentValidation(v9.5.1)

- :pushpin:Microsoft.AspNetCore.Http(v2.2.2)

- :pushpin:Microsoft.AspNetCore.Http.Abstractions(v2.2.0)

- :pushpin:Microsoft.AspNetCore.Http.Features(v5.0.3)

- :pushpin:Microsoft.Extensions.DependencyInjection(v5.0.1)

:open_file_folder: [Abstract](https://github.com/hlmclgl/RentaCarProject/tree/master/Business/Abstract)

- :page_facing_up:[IAuthService](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Abstract/IAuthService.cs)

- :page_facing_up:[IBrandService](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Abstract/IBrandService.cs)

- :page_facing_up:[ICarImageService](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Abstract/ICarImageService.cs)

- :page_facing_up:[ICarService](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Abstract/ICarService.cs)

- :page_facing_up:[IColorService](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Abstract/IColorService.cs)

- :page_facing_up:[ICreditCardService](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Abstract/ICreditCardService.cs)

- :page_facing_up:[ICustomerFindexScoreService](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Abstract/ICustomerFindeksScoreService.cs)

- :page_facing_up:[ICustomerService](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Abstract/ICustomerService.cs)

- :page_facing_up:[IPaymentService](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Abstract/IPaymentService.cs)

- :page_facing_up:[IRentaCarService](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Abstract/IRentACarService.cs)

- :page_facing_up:[IUserService](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Abstract/IUserService.cs)

:open_file_folder:[BusinessAspect/Autofac](https://github.com/hlmclgl/RentaCarProject/tree/master/Business/BusinessAspect/Autofac)

- :page_facing_up:[SecuredOperation](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/BusinessAspect/Autofac/SecuredOperation.cs)

:open_file_folder:[Concrete](https://github.com/hlmclgl/RentaCarProject/tree/master/Business/Concrete)

- :page_facing_up:[AuthManager](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Concrete/AuthManager.cs)

- :page_facing_up:[BrandManager](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Concrete/BrandManager.cs)

- :page_facing_up:[CarImageManager](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Concrete/CarImageManager.cs)

- :page_facing_up:[CarManager](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Concrete/CarManager.cs)

- :page_facing_up:[ColorManager](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Concrete/ColorManager.cs)

- :page_facing_up:[CreditCardManager](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Concrete/CreditCardManager.cs)

- :page_facing_up:[CustomerFindexScoreManager](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Concrete/CustomerFindeksScoreManager.cs)

- :page_facing_up:[CustomerManager](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Concrete/CustomerManager.cs)

- :page_facing_up:[PaymentManager](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Concrete/PaymentManager.cs)

- :page_facing_up:[RentaCarManager](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Concrete/RentACarManager.cs)

- :page_facing_up:[UserManager](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Concrete/UserManager.cs)

:open_file_folder:[Constants](https://github.com/hlmclgl/RentaCarProject/tree/master/Business/Constants)

- :page_facing_up:[Messages](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Constants/Messages.cs)

:open_file_folder:[DependencyResolvers/Autofac](https://github.com/hlmclgl/RentaCarProject/tree/master/Business/DependencyResolvers/Autofac)

- :page_facing_up:[AutoFacBusinessModule](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/DependencyResolvers/Autofac/AutofacBusinessModule.cs)

:open_file_folder:[ValidationRules/FluentValidation](https://github.com/hlmclgl/RentaCarProject/tree/master/Business/ValidationRules/FluentValidation)

- :page_facing_up:[BrandValidator](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/ValidationRules/FluentValidation/BrandValidator.cs)

- :page_facing_up:[CarValidator](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/ValidationRules/FluentValidation/CarValidator.cs)

- :page_facing_up:[ColorValidator](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/ValidationRules/FluentValidation/ColorValidator.cs)

- :page_facing_up:[CustomerValidator](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/ValidationRules/FluentValidation/CustomerValidator.cs)

- :page_facing_up:[RentaCarValidator](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/ValidationRules/FluentValidation/RentACarValidator.cs)

- :page_facing_up:[UserValidator](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/ValidationRules/FluentValidation/UserValidator.cs)

## Core Layer ##

Core katmanı operasyonların generic yapılarla genelleştirildiği, her proje için kullanılabilecek potansiyele sahip bir katmandır.

  :star:Bellek yönetimi(Caching)

  :star:Operasyonların performans kontrolü(Performance)

  :star:Bir grup operasyonun sırayla, sağlıklı bir şekilde çalışması için transaction yönetimi

  :star:CRUD operasyonlarının sadace IEntity interface'ne bağımlı olan nesneler için genelleştirilmesi

  :star:Genel bağımlılık zincirleri oluşturulması (Bu zincirlerin oluşumunda Autofac ten yararlanılmıştır.)

  :star:CUD(IResult) ve R(IDataResult) operasyonları için ayrı ayrı error ve success yönetimi yapılması

  Alt kısımdaki bağlantıları kullanarak detayları inceleyebilirsiniz.

  :package:**NuGet Packages**

 - :pushpin:Autofac(v6.1.0)

 - :pushpin:Autofac.Extras.DynamicProxy(v6.0.0)

 - :pushpin:FluentValidation(v9.5.1)

 - :pushpin:Microsoft.AspNetCore.Http(v2.2.2)

 - :pushpin:Microsoft.AspNetCore.Http.Features(v5.0.3)

 - :pushpin:Microsoft.EntityFrameworkCore.SqlServer(v3.1.11)

 - :pushpin:Microsoft.IdentityModel.Tokens(v6.8.0)

 - :pushpin:System.IdentityModel.Tokens.Jwt(v6.8.0)

:open_file_folder: [Aspects/Autofac](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/Aspects/Autofac)
- :open_file_folder:[Caching](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/Aspects/Autofac/Caching)

  - :page_facing_up:[Cache Aspect](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Aspects/Autofac/Caching/CacheAspect.cs)

  - :page_facing_up:[Cache Remove Aspect](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Aspects/Autofac/Caching/CacheRemoveAspect.cs)

- :open_file_folder:[Performance](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/Aspects/Autofac/Performance)

  - :page_facing_up:[PerformanceAspect](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Aspects/Autofac/Performance/PerformanceAspect.cs)

- :open_file_folder:[Transaction](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/Aspects/Autofac/Transaction)

  - :page_facing_up:[Transaction Scope Aspect](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Aspects/Autofac/Transaction/TransactionScopeAspect.cs)

- :open_file_folder:[Validation](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/Aspects/Autofac/Validation)

  - :page_facing_up:[Validation Aspect](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Aspects/Autofac/Validation/ValidationAspect.cs)

:open_file_folder:[Cross Cutting Conserns](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/CrossCuttingConcerns)

- :open_file_folder:[Caching](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/CrossCuttingConcerns/Caching)

  - 📂[Microsoft](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/CrossCuttingConcerns/Caching/Microsoft)

       - :page_facing_up:[Memory Cache Manager](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/CrossCuttingConcerns/Caching/Microsoft/MemoryCacheManager.cs)

  - 📄[ICache Manager](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/CrossCuttingConcerns/Caching/ICacheManager.cs)

- :open_file_folder:[Validation](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/CrossCuttingConcerns/Validation)

  - 📄[Validation Tool](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/CrossCuttingConcerns/Validation/ValidationTool.cs)

:open_file_folder:[Data Access](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/DataAccess)

- :open_file_folder:[EntityFramework](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/DataAccess/EntityFramework)

  - :page_facing_up:[EfEntity Repository Base](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/DataAccess/EntityFramework/EfEntityRepositoryBase.cs)

- 📄[IEntity Repository](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/DataAccess/IEntityRepository.cs)

📂[Dependency Resolvers](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/DependencyResolvers)

 - 📄[Core Module](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/DependencyResolvers/CoreModule.cs)

📂[Entities](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/Entities)

 - 📂[Abstract](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/Entities/Abstract)

   - 📄[IEntity](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Entities/Abstract/IEntity.cs)

   - 📄[IDto](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Entities/Abstract/IDto.cs)

 - 📂[Concrete](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/Entities/Concrete) 📌Login, register işlemleri ve bir kullacıya atanan roller genel olarak her projede olmasından dolayı bu işlemlere ait nesneler Core katmanın da oluşturulmutur.

   - 📄[Operation Claim](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Entities/Concrete/OperationClaim.cs)

   - 📄[User](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Entities/Concrete/User.cs)

   - 📄[User Operation Claim](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Entities/Concrete/UserOperationClaim.cs)

📂[Extensions](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/Extensions)

 - 📄[Claim Extensions](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Extensions/ClaimExtensions.cs)

 - 📄[Claims Principal Extensions](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Extensions/ClaimsPrincipalExtensions.cs)

 - 📄[Error Details](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Extensions/ErrorDetails.cs)

 - 📄[Exception Middleware](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Extensions/ExceptionMiddleware.cs)

 - 📄[Exception Middleware Extensions](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Extensions/ExceptionMiddlewareExtensions.cs)

 - 📄[Service Collection Extensions](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Extensions/ServiceCollectionExtensions.cs)

📂[Utilities](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/Utilities)

 - 📂[Business](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/Utilities/Business)

   - 📄[Business Rules](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Utilities/Business/BusinessRules.cs) :pushpin:İş kurallarının genel bir yapıdan geçmesi sağlanılmıştır.

 - 📂[Helpers](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/Utilities/Helpers)

   - 📄[File Helper](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Utilities/Helpers/FileHelper.cs) 📌Dosya işlemleri CRUD operasyonları için genel hale getirilmiştir.

 - 📂[IOC](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/Utilities/IOC)

   - 📄[ICore Module](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Utilities/IOC/ICoreModule.cs)

   - 📄[Service Tool](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Utilities/IOC/ServiceTool.cs)

 - 📂[Interceptors](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/Utilities/Interceptors)

   - 📄[Aspect Interceptor Selector](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Utilities/Interceptors/AspectInterceptorSelector.cs)

   - 📄[Method Interception](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Utilities/Interceptors/MethodInterception.cs)

   - 📄[Method Interception Base Attribute](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Utilities/Interceptors/MethodInterceptionBaseAttribute.cs)

 - 📂[Results](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/Utilities/Results) 📌Kullanıcıya yansıyacak sonuçlar kontrol altına alınmıştır.

   - 📄[Data Result](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Utilities/Results/DataResult.cs)

   - 📄[Error Data Result](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Utilities/Results/ErrorDataResult.cs)

   - 📄[Error Result](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Utilities/Results/ErrorResult.cs)

   - 📄[IData Result](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Utilities/Results/IDataResult.cs)

   - 📄[IResult](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Utilities/Results/IResult.cs)

   - 📄[Result](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Utilities/Results/Result.cs)

   - 📄[Success Data Result](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Utilities/Results/SuccessDataResult.cs)

   - 📄[Success Result](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Utilities/Results/SuccessResult.cs)

 - 📂[Security](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/Utilities/Security) 📌Kullanıcıyla ilgili güvenlik işlemleri aşağıda gerçekleşmiştir.

   - 📂[Encyption](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/Utilities/Security/Encyption)

      - 📄[Security Key Helper](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Utilities/Security/Encyption/SecurityKeyHelper.cs)

      - 📄[Signing Credentials Helper](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Utilities/Security/Encyption/SigningCredentialsHelper.cs)

   - 📂[Hashing](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/Utilities/Security/Hashing)

      - 📄[Hashing Helper](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Utilities/Security/Hashing/HashingHelper.cs)

   - 📂[JWT](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/Utilities/Security/JWT)

      - 📄[Access Token](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Utilities/Security/JWT/AccessToken.cs)

      - 📄[IToken Helper](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Utilities/Security/JWT/ITokenHelper.cs)

      - 📄[JWT Helper](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Utilities/Security/JWT/JwtHelper.cs)

      - 📄[Token Options](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Utilities/Security/JWT/TokenOptions.cs)

## WebAPI ##

:package:**NuGet Packages**

  - :pushpin:Autofac.Extensions.DependencyInjection(v7.1.0)

  - :pushpin:Microsoft.AspNetCore.Authentication.JwtBearer(v3.1.12)

:open_file_folder:[Controllers](https://github.com/hlmclgl/RentaCarProject/tree/master/WebAPI/Controllers)

- :page_facing_up:[AuthController](https://github.com/hlmclgl/RentaCarProject/blob/master/WebAPI/Controllers/AuthController.cs)

- :page_facing_up:[BrandsController](https://github.com/hlmclgl/RentaCarProject/blob/master/WebAPI/Controllers/BrandsController.cs)

- :page_facing_up:[CarImageController](https://github.com/hlmclgl/RentaCarProject/blob/master/WebAPI/Controllers/CarImageController.cs)

- :page_facing_up:[CarsController](https://github.com/hlmclgl/RentaCarProject/blob/master/WebAPI/Controllers/CarsController.cs)

- :page_facing_up:[ColorsController](https://github.com/hlmclgl/RentaCarProject/blob/master/WebAPI/Controllers/ColorsController.cs)

- :page_facing_up:[CreditCardsController](https://github.com/hlmclgl/RentaCarProject/blob/master/WebAPI/Controllers/CreditCardsController.cs)

- :page_facing_up:[CustomersController](https://github.com/hlmclgl/RentaCarProject/blob/master/WebAPI/Controllers/CustomersController.cs)

- :page_facing_up:[CustomerFindexScoreController](https://github.com/hlmclgl/RentaCarProject/blob/master/WebAPI/Controllers/CustomersFindeksScoresController.cs)

- :page_facing_up:[PaymentsController](https://github.com/hlmclgl/RentaCarProject/blob/master/WebAPI/Controllers/PaymentsController.cs)

- :page_facing_up:[RentaCarsController](https://github.com/hlmclgl/RentaCarProject/blob/master/WebAPI/Controllers/RentACarsController.cs)

- :page_facing_up:[UsersController](https://github.com/hlmclgl/RentaCarProject/blob/master/WebAPI/Controllers/UsersController.cs)

:page_facing_up:[Program](https://github.com/hlmclgl/RentaCarProject/blob/master/WebAPI/Program.cs)

:page_facing_up:[StartUp](https://github.com/hlmclgl/RentaCarProject/blob/master/WebAPI/Startup.cs)

 ### :pushpin:***LinkedIn hesabıma [buradan](https://www.linkedin.com/in/ahmet-hilmi-%C3%A7ilo%C4%9Flu-884012203/) ulaşabilirsiniz.*** ###

 ### :e-mail:***E-mail<EMAIL_ADDRESS>###

# RentaCarProject

## English Description ##

RentaCarProject is a car rental project that belongs to the C# programming language, adhering to SOLID principles and with an N-layer architecture structure; it is still under development. You are currently studying the back-end part of the project.

***:link:You can arrive at the front-end section [from here](https://github.com/hlmclgl/RentaCarProject-Frontend).***

The database was created based on the SQL Server Object Explorer section in Visual Studio 2019. At the bottom, you can see the field names and data types of some tables belonging to this database.

:open_file_folder:[Database](https://github.com/hlmclgl/RentaCarProject/tree/master/DB)

RentaCarProject consists of Entities, DataAccess, and Business layers. Initially, the ConsoleUI layer was used to simulate operations on these layers. Later, Postman was used to test operations with WebAPI configuration in the project. Let's examine these layers closely:

## Entities Layer ##
This layer is created for database objects. In the Concrete folder, there are only 'classes 'created for tables, while in the DTOs folder section, there are 'classes' created to combine properties in different tables. You can review the details using the links at the bottom.

:open_file_folder:[Concrete](https://github.com/hlmclgl/RentaCarProject/tree/master/Entities/Concrete)

- :page_facing_up:[Brand](https://github.com/hlmclgl/RentaCarProject/blob/master/Entities/Concrete/Brand.cs)

- :page_facing_up:[Car](https://github.com/hlmclgl/RentaCarProject/blob/master/Entities/Concrete/Car.cs)

- :page_facing_up:[CarImage](https://github.com/hlmclgl/RentaCarProject/blob/master/Entities/Concrete/CarImage.cs)

- :page_facing_up:[Color](https://github.com/hlmclgl/RentaCarProject/blob/master/Entities/Concrete/Color.cs)

- :page_facing_up:[CreditCard](https://github.com/hlmclgl/RentaCarProject/blob/master/Entities/Concrete/CreditCard.cs)

- :page_facing_up:[Customer](https://github.com/hlmclgl/RentaCarProject/blob/master/Entities/Concrete/Customer.cs)

- :page_facing_up:[CustomerFindexScore](https://github.com/hlmclgl/RentaCarProject/blob/master/Entities/Concrete/CustomerFindeksScore.cs)

- :page_facing_up:[PaymentTest](https://github.com/hlmclgl/RentaCarProject/blob/master/Entities/Concrete/PaymentTest.cs)

- :page_facing_up:[Rental](https://github.com/hlmclgl/RentaCarProject/blob/master/Entities/Concrete/Rental.cs)

:open_file_folder:[Dto's](https://github.com/hlmclgl/RentaCarProject/tree/master/Entities/DTO's)

- :page_facing_up:[CarDetailDto](https://github.com/hlmclgl/RentaCarProject/blob/master/Entities/DTO's/CarDetailDto.cs)

- :page_facing_up:[CarImageDto](https://github.com/hlmclgl/RentaCarProject/blob/master/Entities/DTO's/CarImageDto.cs)

- :page_facing_up:[CustomerDetailDto](https://github.com/hlmclgl/RentaCarProject/blob/master/Entities/DTO's/CustomerDetailDto.cs)

- :page_facing_up:[RentalDetailDto](https://github.com/hlmclgl/RentaCarProject/blob/master/Entities/DTO's/RentalDetailDto.cs)

- :page_facing_up:[UserDetailDto](https://github.com/hlmclgl/RentaCarProject/blob/master/Entities/DTO's/UserDetailDto.cs)

- :page_facing_up:[UserForLoginDto](https://github.com/hlmclgl/RentaCarProject/blob/master/Entities/DTO's/UserForLoginDto.cs)

- :page_facing_up:[UserForRegisterDto](https://github.com/hlmclgl/RentaCarProject/blob/master/Entities/DTO's/UserForRegisterDto.cs)

- :page_facing_up:[UserForUpdateDto](https://github.com/hlmclgl/RentaCarProject/blob/master/Entities/DTO's/UserForUpdateDto.cs)

## Data Access Layer ##

Database-related operations and database connections are located on this layer. You can review the details using the links at the bottom.

:package: **NuGet Packages**

- :pushpin: Microsoft.EntityFrameworkCore.SqlServer(v3.1.11)

:open_file_folder:[Abstract](https://github.com/hlmclgl/RentaCarProject/tree/master/DataAccess/Abstract)

- :page_facing_up:[IBrandDal](https://github.com/hlmclgl/RentaCarProject/blob/master/DataAccess/Abstract/IBrandDal.cs)

- :page_facing_up:[ICarDal](https://github.com/hlmclgl/RentaCarProject/blob/master/DataAccess/Abstract/ICarDal.cs)

- :page_facing_up:[ICarImageDal](https://github.com/hlmclgl/RentaCarProject/blob/master/DataAccess/Abstract/ICarImageDal.cs)

- :page_facing_up:[IColorDal](https://github.com/hlmclgl/RentaCarProject/blob/master/DataAccess/Abstract/IColorDal.cs)

- :page_facing_up:[ICreditCardDal](https://github.com/hlmclgl/RentaCarProject/blob/master/DataAccess/Abstract/ICreditCardDal.cs)

- :page_facing_up:[ICustomerDal](https://github.com/hlmclgl/RentaCarProject/blob/master/DataAccess/Abstract/ICustomerDal.cs)

- :page_facing_up:[ICustomerFindeksScoreDal](https://github.com/hlmclgl/RentaCarProject/blob/master/DataAccess/Abstract/ICustomerFindeksScoreDal.cs)

- :page_facing_up:[IRentaCarDal](https://github.com/hlmclgl/RentaCarProject/blob/master/DataAccess/Abstract/IRentACarDal.cs)

- :page_facing_up:[IUserDal](https://github.com/hlmclgl/RentaCarProject/blob/master/DataAccess/Abstract/IUserDal.cs)

:open_file_folder:[Concrete](https://github.com/hlmclgl/RentaCarProject/tree/master/DataAccess/Concrete)

- :open_file_folder:[Entity Framework](https://github.com/hlmclgl/RentaCarProject/tree/master/DataAccess/Concrete/EntityFramework)

  - :page_facing_up:[EfBrandDal](https://github.com/hlmclgl/RentaCarProject/blob/master/DataAccess/Concrete/EntityFramework/EfBrandDal.cs)

  - :page_facing_up:[EfCarDal](https://github.com/hlmclgl/RentaCarProject/blob/master/DataAccess/Concrete/EntityFramework/EfCarDal.cs)

  - :page_facing_up:[EfCarImageDal](https://github.com/hlmclgl/RentaCarProject/blob/master/DataAccess/Concrete/EntityFramework/EfCarImageDal.cs)

  - :page_facing_up:[EfColorDal](https://github.com/hlmclgl/RentaCarProject/blob/master/DataAccess/Concrete/EntityFramework/EfColorDal.cs)

  - :page_facing_up:[EfCreditCardDal](https://github.com/hlmclgl/RentaCarProject/blob/master/DataAccess/Concrete/EntityFramework/EfCreditCardDal.cs)

  - :page_facing_up:[EfCustomerDal](https://github.com/hlmclgl/RentaCarProject/blob/master/DataAccess/Concrete/EntityFramework/EfCustomerDal.cs)

  - :page_facing_up:[EfCustomerFindeksScoreDal](https://github.com/hlmclgl/RentaCarProject/blob/master/DataAccess/Concrete/EntityFramework/EfCustomerFindeksScoreDal.cs)

  - :page_facing_up:[EfRentaCarDal](https://github.com/hlmclgl/RentaCarProject/blob/master/DataAccess/Concrete/EntityFramework/EfRentACarDal.cs)

  - :page_facing_up:[EfUserDal](https://github.com/hlmclgl/RentaCarProject/blob/master/DataAccess/Concrete/EntityFramework/EfUserDal.cs)

  - :page_facing_up:[RentaCarContext](https://github.com/hlmclgl/RentaCarProject/blob/master/DataAccess/Concrete/EntityFramework/RentaCarContext.cs)

:link:The InMemory Folder is not a connection to the contents database, but was created for testing purposes only for startup.

## Business Layer ##

Business rules for Operations contained in the DataAcess layer are included in this layer. You can review the details using the links at the bottom.

:package:**NuGet Packages**

- :pushpin:Autofac(v6.1.0)

- :pushpin:Autofac.Extras.DynamicProxy(v6.0.0)

- :pushpin:FluentValidation(v9.5.1)

- :pushpin:Microsoft.AspNetCore.Http(v2.2.2)

- :pushpin:Microsoft.AspNetCore.Http.Abstractions(v2.2.0)

- :pushpin:Microsoft.AspNetCore.Http.Features(v5.0.3)

- :pushpin:Microsoft.Extensions.DependencyInjection(v5.0.1)

:open_file_folder: [Abstract](https://github.com/hlmclgl/RentaCarProject/tree/master/Business/Abstract)

- :page_facing_up:[IAuthService](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Abstract/IAuthService.cs)

- :page_facing_up:[IBrandService](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Abstract/IBrandService.cs)

- :page_facing_up:[ICarImageService](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Abstract/ICarImageService.cs)

- :page_facing_up:[ICarService](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Abstract/ICarService.cs)

- :page_facing_up:[IColorService](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Abstract/IColorService.cs)

- :page_facing_up:[ICreditCardService](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Abstract/ICreditCardService.cs)

- :page_facing_up:[ICustomerFindexScoreService](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Abstract/ICustomerFindeksScoreService.cs)

- :page_facing_up:[ICustomerService](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Abstract/ICustomerService.cs)

- :page_facing_up:[IPaymentService](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Abstract/IPaymentService.cs)

- :page_facing_up:[IRentaCarService](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Abstract/IRentACarService.cs)

- :page_facing_up:[IUserService](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Abstract/IUserService.cs)

:open_file_folder:[BusinessAspect/Autofac](https://github.com/hlmclgl/RentaCarProject/tree/master/Business/BusinessAspect/Autofac)

- :page_facing_up:[SecuredOperation](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/BusinessAspect/Autofac/SecuredOperation.cs)

:open_file_folder:[Concrete](https://github.com/hlmclgl/RentaCarProject/tree/master/Business/Concrete)

- :page_facing_up:[AuthManager](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Concrete/AuthManager.cs)

- :page_facing_up:[BrandManager](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Concrete/BrandManager.cs)

- :page_facing_up:[CarImageManager](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Concrete/CarImageManager.cs)

- :page_facing_up:[CarManager](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Concrete/CarManager.cs)

- :page_facing_up:[ColorManager](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Concrete/ColorManager.cs)

- :page_facing_up:[CreditCardManager](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Concrete/CreditCardManager.cs)

- :page_facing_up:[CustomerFindexScoreManager](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Concrete/CustomerFindeksScoreManager.cs)

- :page_facing_up:[CustomerManager](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Concrete/CustomerManager.cs)

- :page_facing_up:[PaymentManager](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Concrete/PaymentManager.cs)

- :page_facing_up:[RentaCarManager](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Concrete/RentACarManager.cs)

- :page_facing_up:[UserManager](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Concrete/UserManager.cs)

:open_file_folder:[Constants](https://github.com/hlmclgl/RentaCarProject/tree/master/Business/Constants)

- :page_facing_up:[Messages](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/Constants/Messages.cs)

:open_file_folder:[DependencyResolvers/Autofac](https://github.com/hlmclgl/RentaCarProject/tree/master/Business/DependencyResolvers/Autofac)

- :page_facing_up:[AutoFacBusinessModule](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/DependencyResolvers/Autofac/AutofacBusinessModule.cs)

:open_file_folder:[ValidationRules/FluentValidation](https://github.com/hlmclgl/RentaCarProject/tree/master/Business/ValidationRules/FluentValidation)

- :page_facing_up:[BrandValidator](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/ValidationRules/FluentValidation/BrandValidator.cs)

- :page_facing_up:[CarValidator](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/ValidationRules/FluentValidation/CarValidator.cs)

- :page_facing_up:[ColorValidator](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/ValidationRules/FluentValidation/ColorValidator.cs)

- :page_facing_up:[CustomerValidator](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/ValidationRules/FluentValidation/CustomerValidator.cs)

- :page_facing_up:[RentaCarValidator](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/ValidationRules/FluentValidation/RentACarValidator.cs)

- :page_facing_up:[UserValidator](https://github.com/hlmclgl/RentaCarProject/blob/master/Business/ValidationRules/FluentValidation/UserValidator.cs)

## Core Layer ##

The Core layer is a layer where operations are generalized with generic structures, with potential that can be used for each project.

  :star:Memory management(Caching)

  :star:Performance control of operations(Performance)

  :star:Transaction management for a group of operations to work sequentially, in a healthy way

  :star:Generalization of CRUD operations for objects that depend only on the IEntity interface

  :star:Creating general dependency chains ( Was used in the formation of these chains from Autofac.)

  :star:CUD(IResult) and R(IDataResult) individual error and success management for operations

  You can review the details using the links at the bottom.

  :package:**NuGet Packages**

 - :pushpin:Autofac(v6.1.0)

 - :pushpin:Autofac.Extras.DynamicProxy(v6.0.0)

 - :pushpin:FluentValidation(v9.5.1)

 - :pushpin:Microsoft.AspNetCore.Http(v2.2.2)

 - :pushpin:Microsoft.AspNetCore.Http.Features(v5.0.3)

 - :pushpin:Microsoft.EntityFrameworkCore.SqlServer(v3.1.11)

 - :pushpin:Microsoft.IdentityModel.Tokens(v6.8.0)

 - :pushpin:System.IdentityModel.Tokens.Jwt(v6.8.0)

:open_file_folder: [Aspects/Autofac](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/Aspects/Autofac)
- :open_file_folder:[Caching](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/Aspects/Autofac/Caching)

  - :page_facing_up:[Cache Aspect](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Aspects/Autofac/Caching/CacheAspect.cs)

  - :page_facing_up:[Cache Remove Aspect](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Aspects/Autofac/Caching/CacheRemoveAspect.cs)

- :open_file_folder:[Performance](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/Aspects/Autofac/Performance)

  - :page_facing_up:[PerformanceAspect](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Aspects/Autofac/Performance/PerformanceAspect.cs)

- :open_file_folder:[Transaction](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/Aspects/Autofac/Transaction)

  - :page_facing_up:[Transaction Scope Aspect](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Aspects/Autofac/Transaction/TransactionScopeAspect.cs)

- :open_file_folder:[Validation](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/Aspects/Autofac/Validation)

  - :page_facing_up:[Validation Aspect](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Aspects/Autofac/Validation/ValidationAspect.cs)

:open_file_folder:[Cross Cutting Conserns](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/CrossCuttingConcerns)

- :open_file_folder:[Caching](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/CrossCuttingConcerns/Caching)

  - 📂[Microsoft](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/CrossCuttingConcerns/Caching/Microsoft)

       - :page_facing_up:[Memory Cache Manager](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/CrossCuttingConcerns/Caching/Microsoft/MemoryCacheManager.cs)

  - 📄[ICache Manager](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/CrossCuttingConcerns/Caching/ICacheManager.cs)

- :open_file_folder:[Validation](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/CrossCuttingConcerns/Validation)

  - 📄[Validation Tool](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/CrossCuttingConcerns/Validation/ValidationTool.cs)

:open_file_folder:[Data Access](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/DataAccess)

- :open_file_folder:[EntityFramework](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/DataAccess/EntityFramework)

  - :page_facing_up:[EfEntity Repository Base](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/DataAccess/EntityFramework/EfEntityRepositoryBase.cs)

- 📄[IEntity Repository](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/DataAccess/IEntityRepository.cs)

📂[Dependency Resolvers](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/DependencyResolvers)

 - 📄[Core Module](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/DependencyResolvers/CoreModule.cs)

📂[Entities](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/Entities)

 - 📂[Abstract](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/Entities/Abstract)

   - 📄[IEntity](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Entities/Abstract/IEntity.cs)

   - 📄[IDto](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Entities/Abstract/IDto.cs)

 - 📂[Concrete](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/Entities/Concrete) 📌Because Login, register operations, and roles assigned to a user are usually in each project, objects belonging to these operations are also created in the Core layer.

   - 📄[Operation Claim](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Entities/Concrete/OperationClaim.cs)

   - 📄[User](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Entities/Concrete/User.cs)

   - 📄[User Operation Claim](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Entities/Concrete/UserOperationClaim.cs)

📂[Extensions](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/Extensions)

 - 📄[Claim Extensions](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Extensions/ClaimExtensions.cs)

 - 📄[Claims Principal Extensions](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Extensions/ClaimsPrincipalExtensions.cs)

 - 📄[Error Details](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Extensions/ErrorDetails.cs)

 - 📄[Exception Middleware](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Extensions/ExceptionMiddleware.cs)

 - 📄[Exception Middleware Extensions](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Extensions/ExceptionMiddlewareExtensions.cs)

 - 📄[Service Collection Extensions](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Extensions/ServiceCollectionExtensions.cs)

📂[Utilities](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/Utilities)

 - 📂[Business](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/Utilities/Business)

   - 📄[Business Rules](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Utilities/Business/BusinessRules.cs) :pushpin:Business rules are provided to pass through a general structure.

 - 📂[Helpers](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/Utilities/Helpers)

   - 📄[File Helper](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Utilities/Helpers/FileHelper.cs) 📌File operations are generalised for CRUD operations.

 - 📂[IOC](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/Utilities/IOC)

   - 📄[ICore Module](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Utilities/IOC/ICoreModule.cs)

   - 📄[Service Tool](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Utilities/IOC/ServiceTool.cs)

 - 📂[Interceptors](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/Utilities/Interceptors)

   - 📄[Aspect Interceptor Selector](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Utilities/Interceptors/AspectInterceptorSelector.cs)

   - 📄[Method Interception](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Utilities/Interceptors/MethodInterception.cs)

   - 📄[Method Interception Base Attribute](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Utilities/Interceptors/MethodInterceptionBaseAttribute.cs)

 - 📂[Results](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/Utilities/Results) 📌The results that will be reflected to the user are under control.

   - 📄[Data Result](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Utilities/Results/DataResult.cs)

   - 📄[Error Data Result](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Utilities/Results/ErrorDataResult.cs)

   - 📄[Error Result](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Utilities/Results/ErrorResult.cs)

   - 📄[IData Result](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Utilities/Results/IDataResult.cs)

   - 📄[IResult](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Utilities/Results/IResult.cs)

   - 📄[Result](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Utilities/Results/Result.cs)

   - 📄[Success Data Result](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Utilities/Results/SuccessDataResult.cs)

   - 📄[Success Result](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Utilities/Results/SuccessResult.cs)

 - 📂[Security](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/Utilities/Security) 📌User-related security operations are performed below.

   - 📂[Encyption](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/Utilities/Security/Encyption)

      - 📄[Security Key Helper](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Utilities/Security/Encyption/SecurityKeyHelper.cs)

      - 📄[Signing Credentials Helper](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Utilities/Security/Encyption/SigningCredentialsHelper.cs)

   - 📂[Hashing](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/Utilities/Security/Hashing)

      - 📄[Hashing Helper](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Utilities/Security/Hashing/HashingHelper.cs)

   - 📂[JWT](https://github.com/hlmclgl/RentaCarProject/tree/master/Core/Utilities/Security/JWT)

      - 📄[Access Token](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Utilities/Security/JWT/AccessToken.cs)

      - 📄[IToken Helper](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Utilities/Security/JWT/ITokenHelper.cs)

      - 📄[JWT Helper](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Utilities/Security/JWT/JwtHelper.cs)

      - 📄[Token Options](https://github.com/hlmclgl/RentaCarProject/blob/master/Core/Utilities/Security/JWT/TokenOptions.cs)

## WebAPI ##

:package:**NuGet Packages**

  - :pushpin:Autofac.Extensions.DependencyInjection(v7.1.0)

  - :pushpin:Microsoft.AspNetCore.Authentication.JwtBearer(v3.1.12)

:open_file_folder:[Controllers](https://github.com/hlmclgl/RentaCarProject/tree/master/WebAPI/Controllers)

- :page_facing_up:[AuthController](https://github.com/hlmclgl/RentaCarProject/blob/master/WebAPI/Controllers/AuthController.cs)

- :page_facing_up:[BrandsController](https://github.com/hlmclgl/RentaCarProject/blob/master/WebAPI/Controllers/BrandsController.cs)

- :page_facing_up:[CarImageController](https://github.com/hlmclgl/RentaCarProject/blob/master/WebAPI/Controllers/CarImageController.cs)

- :page_facing_up:[CarsController](https://github.com/hlmclgl/RentaCarProject/blob/master/WebAPI/Controllers/CarsController.cs)

- :page_facing_up:[ColorsController](https://github.com/hlmclgl/RentaCarProject/blob/master/WebAPI/Controllers/ColorsController.cs)

- :page_facing_up:[CreditCardsController](https://github.com/hlmclgl/RentaCarProject/blob/master/WebAPI/Controllers/CreditCardsController.cs)

- :page_facing_up:[CustomersController](https://github.com/hlmclgl/RentaCarProject/blob/master/WebAPI/Controllers/CustomersController.cs)

- :page_facing_up:[CustomerFindexScoreController](https://github.com/hlmclgl/RentaCarProject/blob/master/WebAPI/Controllers/CustomersFindeksScoresController.cs)

- :page_facing_up:[PaymentsController](https://github.com/hlmclgl/RentaCarProject/blob/master/WebAPI/Controllers/PaymentsController.cs)

- :page_facing_up:[RentaCarsController](https://github.com/hlmclgl/RentaCarProject/blob/master/WebAPI/Controllers/RentACarsController.cs)

- :page_facing_up:[UsersController](https://github.com/hlmclgl/RentaCarProject/blob/master/WebAPI/Controllers/UsersController.cs)

:page_facing_up:[Program](https://github.com/hlmclgl/RentaCarProject/blob/master/WebAPI/Program.cs)

:page_facing_up:[StartUp](https://github.com/hlmclgl/RentaCarProject/blob/master/WebAPI/Startup.cs)

 ### :pushpin:***You can access my LinkedIn account [from here](https://www.linkedin.com/in/ahmet-hilmi-%C3%A7ilo%C4%9Flu-884012203/).*** ###

 ### :e-mail:***E-mail<EMAIL_ADDRESS>###

 ## **License** ##

:balance_scale: [MIT :copyright: 2021 Ahmet Hilmi Çiloğlu](https://github.com/hlmclgl/RentaCarProject/blob/master/LICENSE.md)

repository: betulgecer/RentaCarProject

repo_name: betulgecer/RentaCarProject


text:
sammui
===============

[![Join the chat at https://gitter.im/renatomefidf/sammui](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/renatomefidf/sammui?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

[![Build Status](https://travis-ci.org/renatomefidf/sammui.svg?branch=master)](https://travis-ci.org/renatomefidf/sammui)
[![Code Climate](https://codeclimate.com/github/renatomefidf/sammui/badges/gpa.svg)](https://codeclimate.com/github/renatomefidf/sammui)
[![Test Coverage](https://codeclimate.com/github/renatomefidf/sammui/badges/coverage.svg)](https://codeclimate.com/github/renatomefidf/sammui)
[![Latest Stable Version](https://poser.pugx.org/renatomefidf/sammui/v/stable.svg)](https://packagist.org/packages/renatomefidf/sammui)
[![Total Downloads](https://poser.pugx.org/renatomefidf/sammui/downloads.svg)](https://packagist.org/packages/renatomefidf/sammui)
[![Latest Unstable Version](https://poser.pugx.org/renatomefidf/sammui/v/unstable.svg)](https://packagist.org/packages/renatomefidf/sammui)
[![License](https://poser.pugx.org/renatomefidf/sammui/license.svg)](https://packagist.org/packages/renatomefidf/sammui)

The Symfony Angular MongoDB Mobile UI Project

Original project by @flyers: https://github.com/FlyersWeb/angular-symfony

Mirror: http://gitlab.renatomefi.com.br/renatomefi/sammui/commits/master

Introduction
------------

This project is a template application with secured communication via a RestFul API between the client part with AngularJS and the server part with Symfony2.

In use libs and technologies
------------

- Symfony 2.6

- Doctrine MongoDB Bundle (doctrine/mongodb-odm-bundle) 3.0

- FOS Rest Bundle (friendsofsymfony/rest-bundle) 1.4

- FOS User Bundle (friendsofsymfony/user-bundle) 1.3.5

- Layout Mobile Angular UI - http://mobileangularui.com/

JetBrains WebStorm
------------

We are very happy to use WebStorm IDE.

Thanks JetBrains for giving us a license for Open Source Projects

[![Build Status](https://www.jetbrains.com/webstorm/documentation/docs/logo_webstorm.png)](https://www.jetbrains.com/webstorm/)

Automatic Installation
------------

Master:

	composer create-project renatomefidf/sammui sammui dev-master

Any tag:

	composer create-project renatomefidf/sammui sammui v0.0.1

Check the composer package at: https://packagist.org/packages/renatomefidf/sammui

Manual Installation
------------

Clone the project :

	git clone git@github.com:renatomefidf/sammui sammui

Update packages :

	cd angular-symfony
	composer.phar install

Configuration
-------------

Create cache and logs folders :

	mkdir app/cache
	mkdir app/logs
	chmod -R 777 app/cache
	chmod -R 777 app/logs

Edit database credentials :

	vim app/config/parameters.yml

To switch between ORM and ODM (Database and MongoDB) uncomment/comment the following lines on config.yml :

	# FOS User Bundle for ORM
    fos_user:
        db_driver: orm
        firewall_name: main
        user_class: Flyers\BackendBundle\Entity\User

    # FOS User Bundle for MongoDB
    fos_user:
        db_driver: mongodb
        firewall_name: main
        user_class: Flyers\BackendBundle\Document\User

Update schemas (FOSUserBundle) : * Not needed for MongoDB

 	php app/console doctrine:schema:create

Create and activate user :

	php app/console fos:user:create
	php app/console fos:user:activate

Link project to your webserver and access it :

	ln -snf ./ /var/www/html/angular-symfony
	firefox http://localhost/angular-symfony/ &

Want to run it via nginx? There is a sample virtual host on docs/nginx

Database
---------------------
If you want to use my current dev database you can get it at /docs/mongo/DATE_dump
I'm using mongodump tool, so it's easy to recover!

Authentication system
---------------------

The Authentication system is based on the custom Authentication Provider of the Symfony2 Cookbook : http://symfony.com/doc/2.1/cookbook/security/custom_authentication_provider.html

> The following chapter demonstrates how to create a custom authentication provider for WSSE authentication. The security protocol for WSSE provides several security benefits:
> * Username / Password encryption
> * Safe guarding against replay attacks
> * No web server configuration required
>
> WSSE is very useful for the securing of web services, may they be SOAP or REST.

I used the exact same authentication system with a little change in moment of generating the digest, we use the hexadecimal value of the hashed seed in lieu of the binary value.

Client Side specifics
---------------------

On the client side, I've inspired my code from Nils Blum-Oeste article explaining how to send an authorization token for every request. To do this you have to register a wrapper for every resource actions that execute a specific code before doing the action. For more information you can check http://nils-blum-oeste.net/angularjs-send-auth-token-with-every--request/.

The differences there is that I send the token, username and user digest in the HTTP Header *X-WSSE*.

Conclusion
----------

You can use this template and adapt it to your needs.

@FlyersWeb

Adaptations by @renatomefidf

- MongoDB support

- Symfony and related dependencies/bundles update

- Packagist project

license: MIT

repository: nitaibezerra/sammui

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: nitaibezerra/sammui


text:
#Code Your Cloud#
######created by Michael Kaminsky######
####Now available on the Chrome Store (over 2400 users so far)####
####The Project####

Check out the result of the project so far here. It is now completely functional. Enjoy!

![Screenshot](http://codeyourcloud.com/images/web.png)
====

Goal

To allow people around the globe to collaborate on coding projects via Google Drive. It's that simple. So far, I have yet to see a website or program that accomplishes these tasks for all major programming languages. This is an attempt to change that, and it seems to be working well so far.

=====

__a mobile version is in the works__

###Possible Ideas###
+ run languages like Python, etc.
+ templates
+ tutorials

###Features###

+ Syntax highlighting
+ Collaboration
+ Built-in color picker
+ HTML and markdown preview
+ Autocomplete
+ Javascript console
+ Browser
+ Keyboard shortcuts
+ Preferences
+ Google Drive integration
+ Run (javascript and coffeescript only, for now)

=====
###Supported Languages (86)###

+ Javascript
+ APL
+ Asterisk
+ C
+ C++
+ C#
+ Java
+ Clojure
+ Cobol
+ CoffeeScript
+ Common Lisp
+ CSS
+ SCSS
+ LESS
+ Cypher
+ Python
+ Cython
+ D
+ Django
+ Diff
+ DTD
+ Dylan
+ ECL
+ Eiffel
+ Erlang
+ Fortan
+ OCaml
+ F#
+ Gas
+ Gherkin
+ Go
+ Groovy
+ HAML
+ Haskell
+ Haxe
+ JSP
+ EJS
+ ASP.NET
+ HTML
+ HTTP
+ Jade
+ JSON
+ TypeScript
+ Julia
+ LiveScript
+ Lua
+ Markdown
+ Github Markdown
+ mIRC
+ nginx
+ NTriples
+ Octave
+ Pascal
+ Perl
+ PHP
+ PHP/HTML
+ Pig Latin
+ Properties
+ Puppet
+ Q
+ R
+ Ruby
+ Rust
+ Sass
+ Scala
+ Shell
+ Scheme
+ Sieve
+ Smalltalk
+ Smarty
+ Solr
+ SQL
+ mySQL
+ sText
+ TCL
+ LaTex
+ Tiki
+ Toml
+ Turtle
+ VB.NET
+ VBScript
+ Velocity
+ Verilog
+ XML
+ XQuery
+ Swift

=====
###Themes###

+ 3024 Day
+ 3024 Night
+ Ambiance Mobile
+ Ambiance
+ Base16 Light
+ Base16 Dark
+ Blackboard
+ Cobalt
+ Eclipse
+ Elegant
+ Erlang Dark
+ Lesser Dark
+ Mbo
+ Mdn Like
+ Midnight
+ Monokai
+ Neat
+ Night
+ Paraiso Dark
+ Paraiso Light
+ Pastel On Dark
+ RubyBlue
+ Solarized
+ The Matrix
+ Tomorrow Night Eighties
+ Twilight
+ Vibrant Ink
+ Xq light
+ Xq dark
+ Neo

=====
###Resources###

These resources were used in the creation of this project. For a more detailed list, go here

+ [CodeMirror](http://codemirror.net)
+ [FontAwesome](http://fortawesome.github.io/Font-Awesome)
+ [CodeMirror REPL](http://github.com/aaditmshah/codemirror-repl)
+ [JQuery](https://jquery.com)
+ [Node.js](http://nodejs.org/)
+ [WebSockets](http://www.websocket.org/)
+ [Forever](https://github.com/nodejitsu/forever)
+ [LoremJS](https://github.com/f/loremjs)
+ [Polymer](https://polymer-project.org)

======
###License###
```
The MIT License (MIT)

Copyright (c) 2014 @mrmrs

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
```

repository: mehrdadrafiee/codeyourcloud

repo_name: mehrdadrafiee/codeyourcloud


text:
# bbmod_animation_create_transition
`script`
```gml
bbmod_animation_create_transition(model, anim_from, time_from, anim_to, time_to, duration)
```

## Description
Creates a new animation transition between two specified animations.

### Arguments
| Name | Type | Description |
| ---- | ---- | ----------- |
| model | `array` | A Model structure. |
| anim_from | `array` | An Animation structure. |
| time_from | `real` | Animation time of the first animation. |
| anim_to | `array` | An Animation structure. |
| time_to | `real` | Animation time of the second animation. |
| duration | `real` | The duration of the transition in seconds. |

## Returns
`array` The created transition Animation struct.

repository: short-bread/BBMOD

gha_license_id: MIT

repo_name: short-bread/BBMOD


text:
# TeleTorr
The Telegram Bot can control a Transmission torrent client
- searching
- download
- control of downloads
- autoexport to yandex disk

TeleTorr live in docker container

## How to Use Docker container
### 1) Install docker and create neccessary folders
- for finished downloads e.g. /path/to/torrents/downloads
- for incomplete downloads e.g. /path/to/torrents/incomplete

### 2) Write setting.json
```json
{
  "common": {
    "token": "110201543:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw",
    "valid_users": [
      123456789,
      123456789
    ],
    "download_path": "/transmission/downloads"
  },
  "yadisk":{
    "token":"AQAAWAAYFkjxAACCgFQP4DhRH0W-i9tBuGmrU_E"
  }
}
```
* token: The token is a string along the lines of 110201543:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw that will be required to authorize the bot and send requests to the Bot API. Use this bot https://telegram.me/BotFather
* valid_users: The user that is list up in valid_users can communicate with the telegram bot.
Every Telegram user has own id string. put your telegram id into that. You can get user_id through special bot e.g. https://telegram.me/ShowJsonBot
* yadisk: The token of yandex API for working with yandex disk. How to get token - https://github.com/abbat/ydcmd

### 3) Start container
sudo docker run -it --restart=always --name teletorr -v /etc/timezone:/etc/timezone:ro -v /teletorr/setting.json:/teletorr/setting.json:ro -v /teletorr/downloads:/transmission/downloads -v /teletorr/incomplete:/transmission/incomplete shiawasenahoshi/teletorr

(--restart=always - autostart container when it fell down or host restarted)

## Thanks to:
**seungjuchoi** for telegram-control-torrent which I forked\
**abbat** for ydcmd - yandex disk console client\
**rlesouef** for dockerized transmission

repository: ShiawasenaHoshi/TeleTorr

repo_name: ShiawasenaHoshi/TeleTorr


text:
# Week 4

## Five Assumptions on Counterterrorism

### Assumption 1: One can recognize a terrorist

* "Looking for the needle in the haystack"
* Personality profiling or behavioral profiling
* Leads to discrimination
* Highly unsuccessful, as it can lead to a large number of false positives and true negatives
* Assumption is false

### Assumption 2: Deradicalization of terrorists if possible

* Is it possible that a terrorist can change their mind and leave the terrorist organization?
* Is it possible to deradicalize the terrorist group?
* "Former" terrorists that became CT experts
* What if someone leaves a group but not his ideals?

### Assumption 3: Decapitation of terrorist group works

* Arresting or possibly even killing of the leaders of the terrorist group.
* Widely practiced measure.
* Some leaders, especially those of religously inspired terrorist groups, play a crucial role on explaining and safeguarding the groups ideology.
* The younger and smaller the group is, the more often the groups gets destabilized.
* In 17% of the cases, it leads to the collapse of the organization.
* Side effects: strengthening the group, resulting in retaliatory attacks (revenge attacks), increase in public sympathy for the group.
* It might work in one case, but it might backfire in another.
* Successful examples: Aum Sect, Shining Path, Real Irish Republican Party
* Unsuccessful examples: Hamas, Rote Armee Fraktion
* What about human rights?

Bryan C. Price (2012):

* In the long run, decapitated groups have a significantly higher mortality rate, but only 30% ended within two years.
* The earlier the decapitation occurs, the more effective it will be.
* The size does not impact duration.
* Religious groups were less resilient and easier to destroy than nationalist separatist groups.
* Partially true assumption.

> "States that are willing to employ leadership decapitation as part of their counterterrorism strategy should target terrorist group leaders as early as possible."

> "Publicly available evidence that the [drone] strikes have made the US safer overall is ambiguous at best."

### Assumption 4: Terrorism cannot be defeated

* Are we talking about the phenomenon of terrorism or terrorist organizations and individual terrorists?
* Most of the top politicians agree that the terrorism cannot be defeated.
* It this is true, it could strengthen the idea of a big threat. It applies that we should focus on prevention.
* If we cannot stop it, then we should control the impact.

Four major reasons for the defeat of terrorist groups:

1. Local police and intelligent services (40% of the casses)
2. Military force (fight states that support terrorism??? only 7% of the cases)
3. Terrorist group joined the political process (43% of the cases)
4. Terrorist group accomplished their goals (10% of the cases)

* Phenomenon of terrorism indeed cannot be defeated. Individual terrorist organizations and individual terrorists can be defeated.

### Assumption 5: Terrorism can best be managed by a holistic (wide) approach

* Involving a wide range of individuals and groups in combating the terrorism.

Four pillars:

1. Addressing conditions conductive to the spread of terrorism.
2. Preventing and combating terrorism.
3. Building States' capacity to prevent and combat terrorism and strengthen the UN system's role in this regard.
4. Ensuring the respect for human rights and the rule of law are the fundamental basis of the fight against terrorism.

> "We have to adopt holistic approach to combat the menace. I urge police to maintain close relationship with the local community. Interaction with the community would not only provide police information about anti-national and anti-social elements but also deny criminals refuge. This is only possible if they are not feared but respected."

repository: inputsh/notes

repo_name: inputsh/notes


text:
# Extension Dependencies

## Extension classpath

Dynamic extensions can use any library present in Alfresco's webapp classpath. (not tomcat shared)

When you first install dynamic extensions, it scans the webapp classpath for libraries and stores the results in the repository to reduce future startup times.

Whenever the `WEB-INF/lib` changes, the list of libraries is refreshed upon restart. This means you can simply restart Alfresco after adding/removing a jar to `WEB-INF/lib` folder.

You can consult the complete list at `/alfresco/service/dynamic-extensions/container/system-packages`.

A more modular and dynamic way of providing dependencies is by deploying the dependency as an OSGi bundle.
However not any jar file can be deployed as a bundle. It needs to have an OSGi manifest.
Many of the common Java libraries come with a compliant manifest, but not all.

Since version 1.0 of Dynamic Extensions, the control panel will attempt to auto-transform any regular jar file your upload into a valid OSGi bundle.
(BND is used behind the scenes)

The filename is used as a Symbolic-Name. (required for OSGi)

Should you want to perform this manually, (to get more control), you can use the BND tools manually.

Let's take JUnit as an example. Upload the junit jar using `/alfresco/service/dynamic-extensions/bundles/`.
The operation will fail with:
```
Error installing Bundle: Could not generate Bundle filename. Make sure the content is an OSGi bundle.
```

To transform the jar into a bundle, we'll use the **bnd** tool. First, download <https://bndtools.ci.cloudbees.com/job/bnd.master/lastSuccessfulBuild/artifact/dist/bundles/biz/aQute/bnd/biz.aQute.bnd/>.

To have a look at the existing manifest:
```
java -jar bnd.jar print junit.jar

[MANIFEST junit-4.11]
Ant-Version                              Apache Ant 1.8.2
Created-By                               1.7.0_04-b20 (Oracle Corporation)
Manifest-Version                         1.0

[IMPEXP]
```

We can see no Import/Export statements, so there is no way for the OSGi container to resolve dependencies.
Using **bnd**'s wrap command, we can generate the required manifest and create a compliant jar file:
```
java -jar bnd.jar wrap -b JUnit -o junit-osgi.jar junit.jar

java -jar bnd.jar print junit-osgi.jar

[MANIFEST junit-osgi]
Ant-Version                              Apache Ant 1.8.2
Bnd-LastModified<PHONE_NUMBER>446
Bundle-ManifestVersion                   2
Bundle-Name                              JUnit
Bundle-SymbolicName                      JUnit
Bundle-Version                           0
Created-By                               1.7.0_45 (Oracle Corporation)
Export-Package                           LICENSE.txt,junit.extensions;uses:="junit.framework",junit.framework;uses:="org.junit.runner,org.junit.runner.manipulation,org.junit.runner.notificat
...
```

We can now finally deploy junit-osgi.jar and extensions using the junit classes. This approach requires no restarts and also allows for deploying/using multiple versions of a library.

A final benefit is the isolation towards Alfresco: none of the deployed OSGi libraries will be visible to Alfresco and thus we can safely deploy newer versions of eg. Guava without conflicting with Alfresco code dependencies.

## ClassNotFoundException

When using libraries such as Hibernate or Spring's @Configuration support, you may encounter `ClassNotFoundException` (ie. references to cglib).

The reason for this is dynamic loading of classes that the bnd tool can not detect from your compiled .class files.

The Gradle plugin sets the `'DynamicImport-Package': '*'` by default when no `Import-Package` header is present.

This means that, if you did not override the `Import-Package` instruction, the classes need to be added to the system classpath: `WEB-INF/lib`.

gha_language: Java


text:
---
layout: "illumio-core"
page_title: "illumio-core_service Resource - terraform-provider-illumio-core"
sidebar_current: "docs-illumio-core-resource-service"
subcategory: ""
description: |-
  Manages Illumio Security Service
---

# illumio-core_service (Resource)

Manages Illumio Security Service

Example Usage
------------

```hcl
resource "illumio-core_service" "example_service" {
  name = "example name service ports"

  service_ports {
    proto = -1
  }

  service_ports {
    proto = 6
    port = 15
  }

  service_ports {
    proto = 1
    icmp_type = 5
	  icmp_code = 5
  }

}

resource "illumio-core_service" "example_windows" {
  name="example name windows service"

  windows_services {
    service_name = "example"
  }

  windows_services {
    proto = 6
    process_name = "example name"
  }

  windows_services {
    proto = 1
    icmp_type = 5
    icmp_code = 5
  }
}

```

## Schema

### Required

- **name** (String) Name of the Service (does not need to be unique). The name should be between 1 to 255 characters

### Optional

- **description** (String) Long description of the Service
- **external_data_reference** (String) External data reference identifier
- **external_data_set** (String) External data set identifier
- **process_name** (String) The process name. The name should be between 1 to 255 characters
- **service_ports** (Block Set) Service ports (see [below for nested schema](#nestedblock--service_ports))
- **windows_services** (Block Set) Windows services (see [below for nested schema](#nestedblock--windows_services))

### Read-Only

- **created_at** (String) Timestamp when this Service was first created
- **created_by** (Map of String) User who created this Service
- **deleted_at** (String) Timestamp when this Service was deleted
- **deleted_by** (Map of String) User who deleted this Service
- **description_url** (String) Description URL Read-only to prevent XSS attacks
- **href** (String) URI of the service
- **update_type** (String) Type of update
- **updated_at** (String) Timestamp when this Service was last updated
- **updated_by** (Map of String) User who last updated this Service

### Nested Schema for `service_ports`

Required:

- **proto** (String) Transport protocol. Allowed values are -1, 1, 2, 4, 6, 17, 47, 58 and 94

Optional:

- **icmp_code** (String) ICMP Code. Allowed when proto is 1 (ICMP) or 58 (ICMPv6). Allowed range is 0 - 15
- **icmp_type** (String) ICMP Type. Allowed when proto is 1 (ICMP) or 58 (ICMPv6). Allowed range is 0 - 255
- **port** (String) Port Number. Also, the starting port when specifying a range. Allowed when value of proto is 6 or 17. Allowed range is 0 - 65535
- **to_port** (String) High end of port range if specifying a range. Allowed range is 0 - 65535

### Nested Schema for `windows_services`

Optional:

- **icmp_code** (String) ICMP Code. Allowed when proto is 1 (ICMP) or 58 (ICMPv6). Allowed range 0 - 15
- **icmp_type** (String) ICMP Type. Allowed when proto is 1 (ICMP) or 58 (ICMPv6). Allowed range is 0 - 255
- **port** (String) Port Number. Also, the starting port when specifying a range. Allowed when value of proto is 6 or 17. Allowed range is 0 - 65535
- **process_name** (String) Name of running process
- **proto** (String) Transport protocol. Allowed values are -1, 1, 2, 4, 6, 17, 47, 58 and 94
- **service_name** (String) Name of Windows Service
- **to_port** (String) High end of port range if specifying a range. Allowed range is 0 - 65535

branch_name: refs/heads/main


text:
# MAGPIE: The Intrusion Detection System for Cyber-Physical Attacks in Internet of Things Smart Homes

MAGPIE (Monitoring AGainst cyber PhysIcal thrEats) is a self-configurable intrusion detection system for detecting cyber-physical attacks in smart home and IoT environments. MAGPIE employs a non-stationary UCB Reinforcement Learning algorithm and the Isolation Forest machine learning algorithm from the SCIKIT learn library, to automatically discover unknown attacks. MAGPIE enables users' to define their own threshold to optimise attack detection for lowering False Positive or False Negative detections, based on the users' detection tolerance and requirements. MAGPIE takes in consideration by cyber and physical sources of data, as well as performing presence inference to dynamically select an appropriate presence-optimised attack detection model at runtime.

# Included in this repository:
1. Full Python source-code with dpkg requirements on Raspberry PI
2. The MAGPIE Parser (written in C)
3. Full list of Python and external library requirements
4. User & Developer user-guide - To be completed
5. All normal and attack datasets used in smart home experiments for reproducing experiments

# MAGPIE core Features:
1. Online and offline training of MAGPIE system
2. Offline detection testing and verification of MAGPIE system
3. Online monitoring of cyber+physical datastream collection interfaces
4. Configurable Reinforcement Learning settings for Isolation Forest model training
5. Configurable online monitoring time window (e.g., datastream buffering and aggregation)
6. Modular datastream parsing engine to add/remove feeds (requires regex extraction for input)
7. User-defined attack detection threshold parameters
8. Configurable user presence detection for dynamic presence model selection during online monitoring
9. Interactive monitoring console output

# Intrusion Detection System Architecture:
The intrusion detection system architecture of MAGPIE is presented below, detailing each of the software and functional components.

# Raspberry PI3 Prototype Schematic:
The schematic below provides an overview of the RaspberryPI 3 prototype system and hardware extensions to implement the MAGPIE architecture and intrusion detection software platform.

# Smart Home Testbed:
Below is a the configuration overview of the smart home testbed used to evaluate the MAGPIE prototype system, including smart home IoT devices which were used in experiments and present in the datasets.

# License [MIT]

[MIT]: https://github.com/isec-greenwich/magpie/blob/add-license-1/LICENSE.md

repository: XingLiangLondon/magpie

repo_name: XingLiangLondon/magpie


text:
[See html formatted version](https://huasofoundries.github.io/google-maps-documentation/BusinessStatus.html)

BusinessStatus constants
------------------------

google.maps.places.BusinessStatus constants

The operational status of the Place, if it is a business, returned in a PlaceResult (indicates whether the place is operational, or closed either temporarily or permanently). Specify these by value, or the constant's name (example: 'OPERATIONAL' or google.maps.places.BusinessStatus.OPERATIONAL).

#### Library

places

Constants

[undefined](#BusinessStatus.CLOSED_PERMANENTLY)

The business is closed permanently.

[undefined](#BusinessStatus.CLOSED_TEMPORARILY)

The business is closed temporarily.

[undefined](#BusinessStatus.OPERATIONAL)

The business is operating normally.

branch_name: refs/heads/develop

gha_language: JavaScript


text:
# nf-core/configs: Imperial scflow Specific Configuration

Extra specific configuration for the scflow pipeline

## Usage

To use, run the pipeline with `-profile imperial` or `-profile imperial_mb`.

This will download and launch the scflow specific [`imperial.config`](../../../conf/pipeline/scflow/imperial.config) which has been pre-configured with a setup suitable for the Imperial HPC cluster.

Example: `nextflow run nf-core/scflow -profile imperial`

## scflow specific configurations for Imperial

Specific configurations for Imperial have been made for scflow.

- Singularity `enabled` and `autoMounts` set to `true`
- Singularity `cacheDir` path set to an RDS location
- Singularity `runOptions` path set to bind (`-B`) RDS paths with container paths.
- Params `ctd_folder` set to an RDS location.
- Parms `ensembl_mappings` set to an RDS location.

repository: nf-core/configs

gha_language: Nextflow

repo_name: nf-core/configs


text:
Notice: Only tested on Python3

Intro:
This workflow not only outputs emoticons swiftly, but also records the most used 10 emoticons. The database is rebuilt every other week.

Thanks:
* The icon provided by [Lucifr](http://lucifr.com/2013/08/01/o3o-workflow-for-alfred/)
* The emoticons library provided by turingou[o3o](https://github.com/turingou/o3o)

感谢:
* [Lucifr](http://lucifr.com/2013/08/01/o3o-workflow-for-alfred/) 童鞋提供 icon
* 感谢turingou 童鞋的[o3o](https://github.com/turingou/o3o)库

repository: Congee/emoticon

repo_name: Congee/emoticon


text:
# globalentry

So you went to https://ttp.cbp.dhs.gov, applied for Global Entry, paid the fee, and are now "conditionally approved". Congratulations! But you just found out that the next available interview appointment is in 6-months in a city far outside your home. You do some research only to discover longer and longer delays for these interview appointments, with year-over-year excuses. So you read about this on travel websites and the recommendation is to monitor the nearest Global Entry enrollment center in case a spot becomes available. Some people in the comment section mention scripts.

All this to avoid the long lines in passport control and customs!

## Shell Script

Simply specify location filters on the command-line, e.g.,

```shell
$ ./find_appointments.py CA
2019-11-21 11:15:00     : San Francisco Global Entry Enrollment Center (5446)
2019-12-03 06:15:00     : Calexico Enrollment Center (5006)
2020-01-14 06:00:00     : San Diego -Otay Mesa Enrollment Center (5002)
2020-06-09 14:00:00     : Los Angeles -Long Beach Seaport  (8920)
None    : Los Angeles International Global Entry EC (5180)
```

You can add multiple location filters (be as specific as you want), but you'll need to escape spaces, e.g.,

```shell
$ ./find_appointments.py Calexico  San\ Diego
2019-12-03 06:15:00     : Calexico Enrollment Center (5006)
2020-01-14 06:00:00     : San Diego -Otay Mesa Enrollment Center (5002)
```

## Python Module

```python
>>>
>>> import globalentry
>>> sites = globalentry.locations.filter('San Diego')
>>> sites[0]['id']
5002
>>>
>>> globalentry.appointments.by_location_id(5002)
datetime.datetime(2020, 3, 3, 8, 45)
>>>
>>> appts = globalentry.appointments.by_locations(['San Diego', 'Los Angeles'])
>>> appts[0]['next_appointment']
datetime.datetime(2019, 10, 28, 9, 15)
>>>
```

## Other Solutions

https://github.com/Drewster727/goes-notify/blob/master/goes-notify.py

repository: timwarnock/globalentry

repo_name: timwarnock/globalentry


text:
## Contribute to the project

There are many ways to contribute to the OpenFaaS project.

Before raising a PR or an issue request that you read our [Contributing guide](https://github.com/openfaas/faas) which applies to every OpenFaaS GitHub repository. We have a wide range of suggestions for contributing to the project and community and only some of those involve writing code.

### Five practical ideas for a first contribution

* Try the [workshop](https://github.com/openfaas/workshop)

* Read the [architecture diagrams](https://docs.openfaas.com/architecture/gateway/)

* Submit a function to the [Function Store](https://github.com/openfaas/store)

* Write a blog post and add it to our [community listing](https://docs.openfaas.com/community/#community-resources)

* Improve the [OpenFaaS CLI tooling](https://github.com/openfaas/faas-cli) with a PR or documentation

### Main Git repositories

Git is used for version control and all repositories are public available under two organisations.

#### OpenFaaS

OpenFaaS started as a single mono-repo called `faas` and has been broken out into separate repositories. For this reason you should always collate Issues, PRs, contributor counts, stars and similar statistics from the organisation as a whole. The data in the `faas` repo is not representive of the whole project.

| Repository       | Headline                        |
|------------------|---------------------------------|
| faas              | Main repository for project issues, suggestions, documentation and roadmap/backlog items. Also includes UI portal and API gateway |
| certifier         | End-to-end tests written in Go for verifying OpenFaaS with Swarm or Kubernetes after a release, this also runs through CI for the `faas` repo      |
| faas-swarm        | Docker Swarm provider for OpenFaaS contains a stack file for deployment |
| faas-netes        | Kubernetes provider for OpenFaaS contains YAML and helm for deployment |
| faas-cloud        | An incubator project for a closed-loop CI/CD system between GitHub and OpenFaaS |
| faas-cli          | CLI for operating with OpenFaaS similar to `kubectl` or `docker` CLI    |
| templates         | Official templates for OpenFaaS CLI used to scaffold a new function |
| media             | Press-kit and media for the project branding and swag             |
| docs              | Official docs repository for this site - i.e. https://docs.openfaas.com             |
| workshop          | Hands-on training lab for learning OpenFaaS                                |
| nats-queue-worker | Asynchronous processing for deferred / queued work with OpenFaaS, based upon NATS Streaming |
| www               | Webpages for https://www.openfaas.com   |

https://github.com/openfaas/

#### OpenFaaS-Incubator

The incubator organisation is for experiments, research and for getting quick feedback. Only some of the projects incubated here will make it into the main project.

https://github.com/openfaas-incubator/

repository: cpitkin/docs

repo_name: cpitkin/docs


text:
<meta name='keywords' content='Recoil, Recoil.js, Recoil Dev Tool, Recoilize, Chrome Dev Tool, Recoil Chrome'>

Debugger for Recoil Applications

# [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/oslabs-beta/Recoilize/blob/staging/LICENSE) [![npm version](https://img.shields.io/npm/v/recoilize)](https://www.npmjs.com/package/recoilize) ![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)

[Korean README 한국어](README_KO.md)

 About

Recoilize is a Chrome Dev Tool meant for debugging applications built with the experimental Recoil.js state management library.

The tool records Recoil state and allows users to easily debug their applications with features such as visualization of the component graph and time traveling to previous states.

Get Recoilize on the Chrome Store!

Demo  Paint app

** STILL IN BETA **

Please note that Recoilize is in BETA. We will continue to make improvements and implement fixes but if you find any issues, please dont hesitate to report them in the issues tab or submit a PR and we'll happily take a look.

Installation

#### Install Recoilize Module

```js
npm install recoilize
```

### ** IMPORTANT **

#### Import RecoilizeDebugger from the Recoilize module

```js
import RecoilizeDebugger from 'recoilize';
```

#### Recoilize requires you to create a variable that grabs the HTML element where you inject your React application

```js
const root = document.getElementById('root');
```

#### You must import all Atoms and Selectors and pass them into the RecoilizeDebugger component as shown below

```js
import * as nodes from './store';

<RecoilizeDebugger nodes={nodes} root={root} />;
```

#### Example:

```js
import RecoilizeDebugger from 'recoilize';
import RecoilRoot from 'recoil';
import * as nodes from './store';

const root = document.getElementById('root');

ReactDOM.render(
  <RecoilRoot>
    <RecoilizeDebugger nodes={nodes} root={root} />
    <App />
  </RecoilRoot>,
  root,
);
```

#### Open your application on the Chrome Browser and start debugging with Recoilize!

##### (Only supported with React applications using Recoil as state management)

Features

Visualizations

Users are able to view visualizations for their application's state by clicking individual snapshots. Recoilize provides component trees and graphs, as well as the state trees in JSON format.

Time Travel

As one of the key features of Recoilize, the tool enables users to jump to any previous snapshots. Pressing the jump button next to each of the snapshots will change the DOM by setting the state to that snapshot.

Throttle

In the settings tab, users are able to set throttle (in milliseconds) for large scale applications or any applications that changes state rapidly. The default is set at 70ms.

State Persistence (BETA)

Recoilize allows the users to persist their application's state through a refresh or reload. At this time, the user is able to view the previous states in the dev tool, but cannot time travel to the states before refresh. The team is still working on completing this feature.

Additional Features

component graph hover to view atoms and selectors

legend to see relationship between component graph and state

Toggle to view raw component graph

filter atom/selector network relationship

filter snapshots by atom/selector keys

 We will continue updating Recoilize alongside Recoil's updates!

 Contributors

Bren Yamaguchi @github @linkedin

Saejin Kang @github @linkedin

Jonathan Escamila @github @linkedin

Sean Smith @github @linkedin

Justin Choo @github @linkedin

Anthony Lin @github @linkedin

Spenser Schwartz @github @linkedin

Steven Nguyen @github @linkedin

Henry Taing @github @linkedin

Seungho Baek @github @linkedin


text:
# Creating the Venue page

In this lesson we will create a new page type called VenuePage and set up the relationship between it and Facilities discussing the different types of relations in silverstripe as well as the different options for Gridfields.

* In atom right-click the mysite/pagetypes/LandingPage.php and choose duplicate
* Enter VenuePage.php as the name
* Change the name of the class at the top of the VenuePage.php to VenuePage
* Also change the \_contoller class name to VenuePage_Controller

Your VenuePage.php file should look like this..

```php
<?php
class VenuePage extends Page
{
    private static $description = 'For details about a venue';

    private static $db = array();

    private static $has_one = array();
}

class VenuePage_Controller extends Page_Controller
{
    private static $allowed_actions = array();
}
```

# Adding the relation to Facilities

Now lets add the relation to facilities. A Venue can have many facility and there can be the same type facility at many venues, so the correct type of relation to use here is many_many.

Add this code to the VenuePage

```php
private static $many_many = array(
    'Facilities' => 'Facility',
);
```

Save and run /dev/build and SilverStripe will create a joining table in the database called VenuePage_Facilities containing a column for the ID of the VenuePage and another column for the ID of the Facility record.

# Gridfield to manage venue-facility relations

Now we still need to add a field in to the CMS for users to see a list of facilities on a venue page. This is done with a Gridfield which is basically an HTML table listing any records related to the page and also buttons and other controls to add/update/delete or link and unlink existing facility records.

Add this code into VenuePage.php, VenuePage class

```php
public function getCMSFields()
{
    // Get parent fields.
    $fields = parent::getCMSFields();

    // Add the gridfield to a new tab called Facilities
    $fields->addFieldToTab(
        'Root.Facilities',
        GridField::create(
            'Facilities',
            'Facilities',
            $this->Facilities(),
            GridFieldConfig_RelationEditor::create()
        )
    );

    // Return the fields.
    return $fields;
}
```

Now in the CMS of the site create a Landing page at the top level called 'Venues', then under this create a Venue page. Give the venue page a name and fill out the other basic details and save and publish it. You should see tab called Facilities so click on it and you will see the gridfield. You can add existing Facilities created via the Model Admin screens by typing the name in the 'Find Facilities by Title' box and then selecting an item from the list and clicking 'Link existing'.

![Facilities Gridfield](img/09_facilities-gridfield.png "Facilities Gridfield")

You will see the Facility you chose now in the list of facilities for the venue page. You can edit the details of the facility by clicking on it its row in the gridfield. Any updates you make will apply to this facility on any page it appears on because facility records are shared between venue pages.

To remove the facility from the Venue page, rather than deleting it, back on the gridfield we can choose Unlink to the right of its row in the table. This simply removes the relation between the page and gridfield; the facility still exists which can be confirmed by going to the Model Admin screens for Facilities accessed from the main menu on the left of the CMS interface.

# Types of relations

OK so that is the code for this particular case, but there are a few types of relations each best suited to different circumstances which we must discuss.

## Many Many

Lets re-cap the type we just used for Venues and Facilities, this was "Many Many" which means a VenuePage can have many Facilities, and a Facility (type) can be at many Venues. In the database a joining table with the VenuPageID and FacilityID is created.

![Many Many DB structure](img/09_many-many.png "Many Many DB structure")

### Many Many Extra Fields

A feature of the many_many relation is that because a new table, a joining table, is created in the database you can specify extra fields (besides the IDs) to go in to this table. One extra field I commonly use is SortOrder which will allow a CMS user to order the related records as desired, so in our case we can specify the order of the facilities for a particular Venue.

So lets do this. Add this code to the VenuePage after the $many_many array...

```php
private static $many_many_extraFields = array(
    'Facilities' => array('SortOrder' => 'Int'),
);
```

And inside the getCmsFields function add this line to the gridfield after the GridFieldConfig_RelationEditor::create()

```php
->addComponent(new GridFieldOrderableRows('SortOrder'))
```

Save, /dev/build and then bring up your venue page in the CMS (or reload it if you already have it open). On the Facilities tab you should notice that on the left of the rows of Facilities added to the gridfield that there is a small icon which kind of looks like :: or || if you click and drag this you can move rows up or down specifying the order of them. Under the hood this causes the SortOrder column in the VenuPage_Facilities table to be set for all records linked to the venue page. We can use this sort order later in the template for the Venue page to output the Facilities in the order the CMS user has specified rather than just the order in which the records appear in the database table.

## Has Many

This type is suited for when a thing has many of another thing, but the other thing belongs to only one of the first thing. For example if we had used has_many for the VenuePage and Facility relation then a Facility could only appear on one Venue page, they are not shared, so that would mean if all Venues had toilets you would need to create a Toilets Facility many times.

Has many is best when the related object can only belong to the primary object. In the database the relation is achieved by an ID column of the primary object being added to the related object's table. For example lets consider a sports team and sports players. A team has many players but a player can only belong to only one team at a time. In the database the Player table would have a TeamID column which is a foreign key (FK) to the Team table.

![Has many DB structure](img/09_has-many.png "Has Many DB structure")

## Has One

This type of relation as the name implies is for when a thing has one of another thing. Example could be employees which have one manager. The database in this case is that a FK column exists on the table which has one to the other table. So to continue our example the employee table would have a managerID column with the ID of the manger. In this case the FK is probably back to the employees table since managers are also employees of a company.

![Has one DB structure](img/09_has-one.png "Has one DB structure")

As has-one is also the other side of a has-many relationship. Going back to our earlier Team and Players example, we can see a player has-one team.

# Types of gridfields

We should also discuss the types of Gridfield as there are a couple of different types, also its possible to add and remove components from Gridfields, for example you might want to remove the Add button so only existing items can be added to the gridfield.

The type of gridfield we used for the VenuePage is called a RelationEditor and that was specified by this line in the getCMSFields code for the gridfield

```php
GridFieldConfig_RelationEditor::create()
```

This type of gridfield is best suited to many_many relations so will be the type of gridfield you use the most, lets compare the three types of gridfields...

* GridFieldConfig_RecordViewer - Allows viewing readonly details of individual records.
* GridFieldConfig_RecordEditor - Allows editing of records contained within the GridField, instead of only allowing the ability to view records in the GridField.
* GridFieldConfig_RelationEditor - Similar to record editor but allows to search for existing records to add to the relationship, detach listed records from the relationship (rather than removing them from the database), and automatically add newly created records to it.

Because the RecordEditor displays a delete rather than an unlink icon at the end of the row, record editors are best when the related records are not shared, when they belong to the primary object with a has_many relation. If you would like to see an example of the RecordEditor type of gridfield then visit the Home page of your site in the CMS and choose the Quicklinks tab. Add a quicklink or 2 and you will see there is a red (x) icon at the right of the rows to actually physically delete the related records, whereas the RelationEditor we used has the unlink option instead.

![Record editor gridfield](img/09_record-editor-gridfield.png "Record editor gridfield")

## Adding and removing components

Its also possible to add and remove components from gridfields, we did this with the SortOrder where we appended to the gridfield config line a function call to add
a GridFieldOrderableRows component, i.e.

```php
GridFieldConfig_RelationEditor::create()
    ->addComponent(new GridFieldOrderableRows('SortOrder'))
```

You can also remove components from greidfields, for example to remove the add button. I often do this with the Relation Editor type of gridfield so CMS users must find and link existing records rather than creating another one which is same by mistake. The code for this is seen below. Add the ->removeComponentsByType('GridFieldAddNewButton') to the gridfield for the facilities for your venue page.

```php
GridFieldConfig_RelationEditor::create()
    ->removeComponentsByType('GridFieldAddNewButton')
```

The methods can be chained because we use the ::create() command. The Get CMS Fields function for you VenuePage should look like this...

```php
public function getCMSFields()
{
    // Get parent fields.
    $fields = parent::getCMSFields();

    // Add the gridfield to a new tab called Facilities
    $fields->addFieldToTab(
        'Root.Facilities',
        GridField::create(
            'Facilities',
            'Facilities',
            $this->Facilities(),
            GridFieldConfig_RelationEditor::create()
                ->addComponent(new GridFieldOrderableRows('SortOrder'))
                ->removeComponentsByType('GridFieldAddNewButton')
        )
    );

    // Return the fields.
    return $fields;
}
```

There is a great module called "gridfield extensions" see https://github.com/symbiote/silverstripe-gridfieldextensions which contains a number of useful components for gridfields you can use. I particularly like the GridFieldAddExistingSearchButton which gives a much more advanced and I believe user friendly way of linking existing items. We won't use that here, but you might want to check out this module at some point.

# Further reading/references

* Relations between records https://docs.silverstripe.org/en/3/developer_guides/model/relations/
* Gridfields https://docs.silverstripe.org/en/3/developer_guides/forms/field_types/gridfield/

# Next

[Lesson 10 - Venue page Template](10_VenuePageTemplate.md)

repository: catalyst/silverstripe-developer-lessons

repo_name: catalyst/silverstripe-developer-lessons


text:
# Naucoria sideroides var. indusiata J.E. Lange, 1940 VARIETY

#### Status
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Fl. Agaric. Danic. 5(Taxon. Consp. ): IV (1940)

#### Original name
Naucoria sideroides var. indusiata J.E. Lange, 1940

### Remarks
null

repository: mdoering/backbone

path: /life/Fungi/Basidiomycota/Agaricomycetes/Agaricales/Strophariaceae/Galerina/Galerina stylifera/ Syn. Naucoria sideroides indusiata/README.md

repo_name: mdoering/backbone


text:
Neural Blocks

[![python-image]][python-url]
[![pytorch-image]][pytorch-url]
[![license-image]][license-url]
[![status-image]][status-url]

[![num_contrib-image]][num_contrib-url]
[![contrib-image]][contrib-url]
[![twitter-image]][twitter-url]

**Note**- If you wish to use Mean Spectral Normalization (MSN), check out the `notebooks` folder.
### :checkered_flag:  Getting Started

### :hammer: Requirements

### :rocket: Usage

### :pray: Acknowledgemants
 - https://github.com/bharathgs/Awesome-pytorch-list

[python-image]: https://img.shields.io/badge/Python-3.x-ff69b4.svg
[python-url]: https://www.python.org/

[pytorch-image]: https://img.shields.io/badge/PyTorch-1.1-2BAF2B.svg
[pytorch-url]: https://pytorch.org/

[contrib-image]: https://img.shields.io/badge/contributions-welcome-blue.svg
[contrib-url]: https://github.com/AntixK/NeuralBlocks/pulls

[num_contrib-image]:https://img.shields.io/github/contributors/AntixK/NeuralBlocks?style=plastic.svg
[num_contrib-url]: https://github.com/AntixK/NeuralBlocks/graphs/contributors

[license-image]:https://img.shields.io/badge/license-MIT-blue.svg
[license-url]:https://github.com/AntixK/NeuralBlocks/blob/master/LICENSE.md

[twitter-image]:https://img.shields.io/twitter/url/https/shields.io.svg?style=social
[twitter-url]:https://twitter.com/intent/tweet?text=Neural%20Blocks-Easy%20to%20use%20neural%20net%20blocks%20for%20fast%20prototyping.&url=https://github.com/AntixK/NeuralBlocks

[status-image]: https://img.shields.io/badge/status-active-success.svg
[status-url]: https://github.com/AntixK/NeuralBlocks

repository: AntixK/NeuralBlocks

repo_name: AntixK/NeuralBlocks