├── Images ├── udemy.png └── banner_blog_udemy_course_aspnetcore.jpg ├── RestWithASPNETUdemy 21 - Connecting To Other Databases ├── README.md ├── RestWithASPNETUdemy │ ├── teste.yml │ ├── appsettings.Development.json │ ├── db │ │ └── script.sql │ ├── Business │ │ └── IPersonBusiness.cs │ └── Program.cs ├── DataAccessMSSqlProvider │ ├── sql_database │ │ └── create_database.sql │ └── Context │ │ └── MSSQLContext.cs ├── DataAccessMySqlProvider │ └── Context │ │ └── MySQLContext.cs ├── DomainModel │ ├── Model │ │ └── Repository │ │ │ └── IPersonRepository.cs │ └── DomainModel.csproj ├── DataAccessSqliteProvider │ └── Context │ │ └── SqliteSQLContext.cs └── DataAccessPostgreSqlProvider │ └── Context │ └── PostgreeSQLContext.cs ├── Documents ├── VO Pattern.png ├── Architecture.png ├── HTTP_StatusCodes.png ├── Generic Repository.png ├── HTTP_StatusCodes_By_Group.png ├── Understending RESTFul API's .pdf └── Building Modern RESTFul API's With ASP.NET Core - Architectural Overview.pdf ├── RestWithASPNETUdemy 11 - HATEOAS └── RestWithASPNETUdemy │ ├── db │ ├── migrations │ │ ├── V1_0_6__Drop_table_books.sql │ │ ├── V1_0_2__Alter_Table_Persons.sql │ │ ├── V1_0_7__Recreate_table_books.sql │ │ ├── V1_0_3__Create_table_books.sql │ │ └── V1_0_1__Create_Table_Persons.sql │ └── dataset │ │ └── V1_0_5__Insert_data_in_persons.sql │ ├── appsettings.Development.json │ ├── Data │ ├── Converter │ │ └── IParser.cs │ └── VO │ │ ├── PersonVO.cs │ │ └── BookVO.cs │ ├── Evolve.json │ ├── appsettings.json │ ├── Model │ └── Base │ │ └── BaseEntity.cs │ ├── Business │ ├── IBookBusiness.cs │ └── IPersonBusiness.cs │ ├── Repository │ ├── Generic │ │ └── IRepository.cs │ └── IPersonRepository.cs │ └── Program.cs ├── RestWithASPNETUdemy 12 - Swagger └── RestWithASPNETUdemy │ ├── db │ ├── migrations │ │ ├── V1_0_6__Drop_table_books.sql │ │ ├── V1_0_2__Alter_Table_Persons.sql │ │ ├── V1_0_7__Recreate_table_books.sql │ │ ├── V1_0_3__Create_table_books.sql │ │ └── V1_0_1__Create_Table_Persons.sql │ └── dataset │ │ └── V1_0_5__Insert_data_in_persons.sql │ ├── appsettings.Development.json │ ├── Data │ ├── Converter │ │ └── IParser.cs │ └── VO │ │ ├── PersonVO.cs │ │ └── BookVO.cs │ ├── Evolve.json │ ├── appsettings.json │ ├── Model │ └── Base │ │ └── BaseEntity.cs │ ├── Business │ ├── IBookBusiness.cs │ └── IPersonBusiness.cs │ ├── Repository │ ├── Generic │ │ └── IRepository.cs │ └── IPersonRepository.cs │ └── Program.cs ├── RestWithASPNETUdemy 15 - PagedSearch └── RestWithASPNETUdemy │ ├── db │ ├── migrations │ │ ├── V1_0_6__Drop_table_books.sql │ │ ├── V1_0_2__Alter_Table_Persons.sql │ │ ├── V1_0_9__Create_table_users.sql │ │ ├── V1_0_7__Recreate_table_books.sql │ │ ├── V1_0_3__Create_table_books.sql │ │ └── V1_0_1__Create_Table_Persons.sql │ └── dataset │ │ ├── V1_0_10__Insert_data_in_users.sql │ │ └── V1_0_5__Insert_data_in_persons.sql │ ├── Business │ ├── ILoginBusiness.cs │ └── IBookBusiness.cs │ ├── appsettings.Development.json │ ├── Data │ ├── VO │ │ ├── UserVO.cs │ │ ├── PersonVO.cs │ │ └── BookVO.cs │ └── Converter │ │ └── IParser.cs │ ├── Repository │ ├── IUserRepository.cs │ └── Generic │ │ └── IPersonRepository.cs │ ├── Evolve.json │ ├── Model │ ├── User.cs │ ├── Base │ │ └── BaseEntity.cs │ └── Context │ │ └── MySQLContext.cs │ ├── Security │ └── Configuration │ │ └── TokenConfiguration.cs │ ├── appsettings.json │ └── Program.cs ├── RestWithASPNETUdemy 19 - Bash Script ├── RestWithASPNETUdemy │ ├── db │ │ ├── migrations │ │ │ ├── V1_0_6__Drop_table_books.sql │ │ │ ├── V1_0_2__Alter_Table_Persons.sql │ │ │ ├── V1_0_9__Create_table_users.sql │ │ │ ├── V1_0_7__Recreate_table_books.sql │ │ │ ├── V1_0_3__Create_table_books.sql │ │ │ └── V1_0_1__Create_Table_Persons.sql │ │ └── dataset │ │ │ ├── V1_0_10__Insert_data_in_users.sql │ │ │ └── V1_0_5__Insert_data_in_persons.sql │ ├── ci │ │ └── init_database.sh │ ├── Other │ │ └── aspnet-life-cycles-events.pdf │ ├── Business │ │ ├── IFileBusiness.cs │ │ ├── ILoginBusiness.cs │ │ ├── IBookBusiness.cs │ │ └── Implementattions │ │ │ └── FileBusinessImpl.cs │ ├── appsettings.Development.json │ ├── Data │ │ ├── VO │ │ │ ├── UserVO.cs │ │ │ ├── PersonVO.cs │ │ │ └── BookVO.cs │ │ └── Converter │ │ │ └── IParser.cs │ ├── evolve.json │ ├── Repository │ │ ├── IUserRepository.cs │ │ └── Generic │ │ │ └── IPersonRepository.cs │ ├── Model │ │ ├── Base │ │ │ └── BaseEntity.cs │ │ ├── User.cs │ │ ├── Book.cs │ │ └── Context │ │ │ └── MySQLContext.cs │ ├── Security │ │ └── Configuration │ │ │ └── TokenConfiguration.cs │ ├── appsettings.json │ └── Program.cs ├── .dockerignore └── Dockerfile ├── RestWithASPNETUdemy 09 - Data Contract └── RestWithASPNETUdemy │ ├── db │ ├── migrations │ │ ├── V1_0_6__Drop_table_books.sql │ │ ├── V1_0_2__Alter_Table_Persons.sql │ │ ├── V1_0_7__Recreate_table_books.sql │ │ ├── V1_0_3__Create_table_books.sql │ │ └── V1_0_1__Create_Table_Persons.sql │ └── dataset │ │ └── V1_0_5__Insert_data_in_persons.sql │ ├── appsettings.Development.json │ ├── Data │ ├── Converter │ │ └── IParser.cs │ └── VO │ │ └── PersonVO.cs │ ├── Evolve.json │ ├── appsettings.json │ ├── Model │ └── Base │ │ └── BaseEntity.cs │ ├── Business │ ├── IBookBusiness.cs │ └── IPersonBusiness.cs │ ├── Repository │ ├── Generic │ │ └── IRepository.cs │ └── IPersonRepository.cs │ └── Program.cs ├── RestWithASPNETUdemy 13 - Authentication └── RestWithASPNETUdemy │ ├── db │ ├── migrations │ │ ├── V1_0_6__Drop_table_books.sql │ │ ├── V1_0_2__Alter_Table_Persons.sql │ │ ├── V1_0_9__Create_table_users.sql │ │ ├── V1_0_7__Recreate_table_books.sql │ │ ├── V1_0_3__Create_table_books.sql │ │ └── V1_0_1__Create_Table_Persons.sql │ └── dataset │ │ ├── V1_0_10__Insert_data_in_users.sql │ │ └── V1_0_5__Insert_data_in_persons.sql │ ├── Business │ ├── ILoginBusiness.cs │ ├── IBookBusiness.cs │ └── IPersonBusiness.cs │ ├── appsettings.Development.json │ ├── Data │ ├── VO │ │ ├── UserVO.cs │ │ └── PersonVO.cs │ └── Converter │ │ └── IParser.cs │ ├── Repository │ ├── IUserRepository.cs │ └── Generic │ │ └── IRepository.cs │ ├── Evolve.json │ ├── Model │ ├── User.cs │ ├── Base │ │ └── BaseEntity.cs │ └── Context │ │ └── MySQLContext.cs │ ├── Security │ └── Configuration │ │ └── TokenConfiguration.cs │ ├── appsettings.json │ └── Program.cs ├── RestWithASPNETUdemy 16 - Binary Files └── RestWithASPNETUdemy │ ├── db │ ├── migrations │ │ ├── V1_0_6__Drop_table_books.sql │ │ ├── V1_0_2__Alter_Table_Persons.sql │ │ ├── V1_0_9__Create_table_users.sql │ │ ├── V1_0_7__Recreate_table_books.sql │ │ ├── V1_0_3__Create_table_books.sql │ │ └── V1_0_1__Create_Table_Persons.sql │ └── dataset │ │ ├── V1_0_10__Insert_data_in_users.sql │ │ └── V1_0_5__Insert_data_in_persons.sql │ ├── Other │ └── aspnet-life-cycles-events.pdf │ ├── Business │ ├── IFileBusiness.cs │ ├── ILoginBusiness.cs │ ├── IBookBusiness.cs │ └── Implementattions │ │ └── FileBusinessImpl.cs │ ├── appsettings.Development.json │ ├── Data │ ├── VO │ │ ├── UserVO.cs │ │ └── PersonVO.cs │ └── Converter │ │ └── IParser.cs │ ├── Repository │ ├── IUserRepository.cs │ └── Generic │ │ └── IPersonRepository.cs │ ├── Evolve.json │ ├── Model │ ├── User.cs │ ├── Base │ │ └── BaseEntity.cs │ └── Context │ │ └── MySQLContext.cs │ ├── Security │ └── Configuration │ │ └── TokenConfiguration.cs │ ├── appsettings.json │ └── Program.cs ├── RestWithASPNETUdemy 17 - Enable Docker ├── RestWithASPNETUdemy │ ├── db │ │ ├── migrations │ │ │ ├── V1_0_6__Drop_table_books.sql │ │ │ ├── V1_0_2__Alter_Table_Persons.sql │ │ │ ├── V1_0_9__Create_table_users.sql │ │ │ ├── V1_0_7__Recreate_table_books.sql │ │ │ ├── V1_0_3__Create_table_books.sql │ │ │ └── V1_0_1__Create_Table_Persons.sql │ │ └── dataset │ │ │ ├── V1_0_10__Insert_data_in_users.sql │ │ │ └── V1_0_5__Insert_data_in_persons.sql │ ├── Other │ │ └── aspnet-life-cycles-events.pdf │ ├── Business │ │ ├── IFileBusiness.cs │ │ ├── ILoginBusiness.cs │ │ ├── IBookBusiness.cs │ │ └── Implementattions │ │ │ └── FileBusinessImpl.cs │ ├── appsettings.Development.json │ ├── Data │ │ ├── VO │ │ │ ├── UserVO.cs │ │ │ └── PersonVO.cs │ │ └── Converter │ │ │ └── IParser.cs │ ├── Repository │ │ ├── IUserRepository.cs │ │ └── Generic │ │ │ └── IPersonRepository.cs │ ├── evolve.json │ ├── Model │ │ ├── User.cs │ │ ├── Base │ │ │ └── BaseEntity.cs │ │ ├── Person.cs │ │ ├── Book.cs │ │ └── Context │ │ │ └── MySQLContext.cs │ ├── Security │ │ └── Configuration │ │ │ └── TokenConfiguration.cs │ ├── appsettings.json │ └── Program.cs ├── .dockerignore ├── docker-compose.override.yml └── docker-compose.yml ├── RestWithASPNETUdemy 20 - Final Release ├── RestWithASPNETUdemy │ ├── db │ │ ├── migrations │ │ │ ├── V1_0_6__Drop_table_books.sql │ │ │ ├── V1_0_2__Alter_Table_Persons.sql │ │ │ ├── V1_0_9__Create_table_users.sql │ │ │ ├── V1_0_7__Recreate_table_books.sql │ │ │ ├── V1_0_3__Create_table_books.sql │ │ │ └── V1_0_1__Create_Table_Persons.sql │ │ └── dataset │ │ │ ├── V1_0_10__Insert_data_in_users.sql │ │ │ └── V1_0_5__Insert_data_in_persons.sql │ ├── ci │ │ └── init_database.sh │ ├── Migrations.zip │ ├── Other │ │ └── aspnet-life-cycles-events.pdf │ ├── Business │ │ ├── IFileBusiness.cs │ │ ├── ILoginBusiness.cs │ │ ├── IBookBusiness.cs │ │ └── Implementattions │ │ │ └── FileBusinessImpl.cs │ ├── appsettings.Development.json │ ├── Data │ │ ├── VO │ │ │ ├── UserVO.cs │ │ │ └── PersonVO.cs │ │ └── Converter │ │ │ └── IParser.cs │ ├── evolve.json │ ├── Repository │ │ ├── IUserRepository.cs │ │ └── Generic │ │ │ └── IPersonRepository.cs │ ├── Model │ │ ├── Base │ │ │ └── BaseEntity.cs │ │ ├── User.cs │ │ ├── Book.cs │ │ └── Context │ │ │ └── MySQLContext.cs │ ├── Security │ │ └── Configuration │ │ │ └── TokenConfiguration.cs │ ├── Program.cs │ └── appsettings.json ├── .dockerignore └── Dockerfile ├── RestWithASPNETUdemy 10 - Content Negotiation └── RestWithASPNETUdemy │ ├── db │ ├── migrations │ │ ├── V1_0_6__Drop_table_books.sql │ │ ├── V1_0_2__Alter_Table_Persons.sql │ │ ├── V1_0_7__Recreate_table_books.sql │ │ ├── V1_0_3__Create_table_books.sql │ │ └── V1_0_1__Create_Table_Persons.sql │ └── dataset │ │ └── V1_0_5__Insert_data_in_persons.sql │ ├── appsettings.Development.json │ ├── Data │ ├── Converter │ │ └── IParser.cs │ └── VO │ │ └── PersonVO.cs │ ├── Evolve.json │ ├── appsettings.json │ ├── Model │ └── Base │ │ └── BaseEntity.cs │ ├── Business │ ├── IBookBusiness.cs │ └── IPersonBusiness.cs │ ├── Repository │ ├── IPersonRepository.cs │ └── Generic │ │ └── IRepository.cs │ └── Program.cs ├── RestWithASPNETUdemy Extra Sessions ├── RestWithASPNETUdemy HATEOAS Done On The Nail │ ├── README.md │ ├── RestWithASPNETUdemy │ │ ├── db │ │ │ ├── migrations │ │ │ │ ├── V1_0_6__Drop_table_books.sql │ │ │ │ ├── V1_0_2__Alter_Table_Persons.sql │ │ │ │ ├── V1_0_7__Recreate_table_books.sql │ │ │ │ ├── V1_0_3__Create_table_books.sql │ │ │ │ └── V1_0_1__Create_Table_Persons.sql │ │ │ └── dataset │ │ │ │ └── V1_0_5__Insert_data_in_persons.sql │ │ ├── appsettings.Development.json │ │ ├── Data │ │ │ └── Converter │ │ │ │ └── IParser.cs │ │ ├── Evolve.json │ │ ├── Model │ │ │ └── Base │ │ │ │ └── BaseEntity.cs │ │ ├── appsettings.json │ │ ├── Business │ │ │ ├── IBookBusiness.cs │ │ │ └── IPersonBusiness.cs │ │ ├── Repository │ │ │ ├── IPersonRepository.cs │ │ │ └── Generic │ │ │ │ └── IRepository.cs │ │ └── Program.cs │ └── Hypermedia │ │ ├── Hypermedia.csproj │ │ ├── Filters │ │ └── HyperMediaFilterOptions.cs │ │ ├── Constants │ │ ├── HttpActionVerb.cs │ │ └── ResponseTypeFormat.cs │ │ └── Abstract │ │ ├── ISupportsHyperMedia.cs │ │ └── IResponseEnricher.cs └── RestWithASPNETUdemy Authentication Get User Principal │ └── RestWithASPNETUdemy │ ├── db │ ├── migrations │ │ ├── V1_0_6__Drop_table_books.sql │ │ ├── V1_0_2__Alter_Table_Persons.sql │ │ ├── V1_0_9__Create_table_users.sql │ │ ├── V1_0_7__Recreate_table_books.sql │ │ ├── V1_0_3__Create_table_books.sql │ │ └── V1_0_1__Create_Table_Persons.sql │ └── dataset │ │ ├── V1_0_10__Insert_data_in_users.sql │ │ └── V1_0_5__Insert_data_in_persons.sql │ ├── Business │ ├── ILoginBusiness.cs │ ├── IBookBusiness.cs │ └── IPersonBusiness.cs │ ├── appsettings.Development.json │ ├── Data │ ├── VO │ │ └── UserVO.cs │ └── Converter │ │ └── IParser.cs │ ├── Repository │ ├── IUserRepository.cs │ └── Generic │ │ └── IRepository.cs │ ├── Evolve.json │ ├── Model │ ├── User.cs │ └── Base │ │ └── BaseEntity.cs │ ├── Security │ └── Configuration │ │ └── TokenConfiguration.cs │ └── appsettings.json ├── RestWithASPNETUdemy 08 - Working With Value Objects └── RestWithASPNETUdemy │ ├── db │ ├── migrations │ │ ├── V1_0_6__Drop_table_books.sql │ │ ├── V1_0_2__Alter_Table_Persons.sql │ │ ├── V1_0_7__Recreate_table_books.sql │ │ ├── V1_0_3__Create_table_books.sql │ │ └── V1_0_1__Create_Table_Persons.sql │ └── dataset │ │ └── V1_0_5__Insert_data_in_persons.sql │ ├── appsettings.Development.json │ ├── Data │ ├── Converter │ │ └── IParser.cs │ └── VO │ │ ├── PersonVO.cs │ │ └── BookVO.cs │ ├── Evolve.json │ ├── appsettings.json │ ├── Model │ └── Base │ │ └── BaseEntity.cs │ ├── Business │ ├── IBookBusiness.cs │ └── IPersonBusiness.cs │ ├── Repository │ ├── Generic │ │ └── IRepository.cs │ └── IPersonRepository.cs │ └── Program.cs ├── RestWithASPNETUdemy 14 - PATH Verb And Query Param └── RestWithASPNETUdemy │ ├── db │ ├── migrations │ │ ├── V1_0_6__Drop_table_books.sql │ │ ├── V1_0_2__Alter_Table_Persons.sql │ │ ├── V1_0_9__Create_table_users.sql │ │ ├── V1_0_7__Recreate_table_books.sql │ │ ├── V1_0_3__Create_table_books.sql │ │ └── V1_0_1__Create_Table_Persons.sql │ └── dataset │ │ ├── V1_0_10__Insert_data_in_users.sql │ │ └── V1_0_5__Insert_data_in_persons.sql │ ├── Business │ ├── ILoginBusiness.cs │ ├── IBookBusiness.cs │ └── IPersonBusiness.cs │ ├── appsettings.Development.json │ ├── Data │ ├── VO │ │ └── UserVO.cs │ └── Converter │ │ └── IParser.cs │ ├── Repository │ ├── IUserRepository.cs │ └── Generic │ │ ├── IPersonRepository.cs │ │ └── IRepository.cs │ ├── Evolve.json │ ├── Model │ ├── User.cs │ ├── Base │ │ └── BaseEntity.cs │ └── Context │ │ └── MySQLContext.cs │ ├── Security │ └── Configuration │ │ └── TokenConfiguration.cs │ ├── appsettings.json │ └── Program.cs ├── RestWithASPNETUdemy 18 - Starting With Dump File ├── RestWithASPNETUdemy │ ├── db │ │ ├── migrations │ │ │ ├── V1_0_6__Drop_table_books.sql │ │ │ ├── V1_0_2__Alter_Table_Persons.sql │ │ │ ├── V1_0_9__Create_table_users.sql │ │ │ ├── V1_0_7__Recreate_table_books.sql │ │ │ ├── V1_0_3__Create_table_books.sql │ │ │ └── V1_0_1__Create_Table_Persons.sql │ │ ├── dataset │ │ │ ├── V1_0_10__Insert_data_in_users.sql │ │ │ └── V1_0_5__Insert_data_in_persons.sql │ │ └── Evolve.json │ ├── Other │ │ └── aspnet-life-cycles-events.pdf │ ├── Business │ │ ├── IFileBusiness.cs │ │ ├── ILoginBusiness.cs │ │ ├── IBookBusiness.cs │ │ └── Implementattions │ │ │ └── FileBusinessImpl.cs │ ├── appsettings.Development.json │ ├── Data │ │ ├── VO │ │ │ └── UserVO.cs │ │ └── Converter │ │ │ └── IParser.cs │ ├── evolve.json │ ├── Repository │ │ ├── IUserRepository.cs │ │ └── Generic │ │ │ └── IPersonRepository.cs │ ├── Security │ │ └── Configuration │ │ │ └── TokenConfiguration.cs │ ├── Model │ │ ├── User.cs │ │ ├── Base │ │ │ └── BaseEntity.cs │ │ └── Context │ │ │ └── MySQLContext.cs │ ├── appsettings.json │ └── Program.cs └── .dockerignore ├── RestWithASPNETUdemy 07 - Working With Generic Repository └── RestWithASPNETUdemy │ ├── db │ ├── migrations │ │ ├── V1_0_6__Drop_table_books.sql │ │ ├── V1_0_2__Alter_Table_Persons.sql │ │ ├── V1_0_7__Recreate_table_books.sql │ │ ├── V1_0_3__Create_table_books.sql │ │ └── V1_0_1__Create_Table_Persons.sql │ └── dataset │ │ └── V1_0_5__Insert_data_in_persons.sql │ ├── appsettings.Development.json │ ├── Evolve.json │ ├── appsettings.json │ ├── Business │ ├── IBookBusiness.cs │ └── IPersonBusiness.cs │ ├── Model │ └── Base │ │ └── BaseEntity.cs │ ├── Repository │ ├── Generic │ │ └── IRepository.cs │ └── IPersonRepository.cs │ └── Program.cs ├── RestWithASPNETUdemy 00 - Scafold ├── RestWithASPNETUdemy │ ├── obj │ │ ├── Debug │ │ │ └── netcoreapp1.1 │ │ │ │ ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs │ │ │ │ ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs │ │ │ │ ├── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs │ │ │ │ ├── RestWithASPNETUdemy.AssemblyInfoInputs.cache │ │ │ │ ├── RestWithASPNETUdemy.csproj.CoreCompileInputs.cache │ │ │ │ ├── RestWithASPNETUdemy.dll │ │ │ │ ├── RestWithASPNETUdemy.pdb │ │ │ │ └── RestWithASPNETUdemy.csprojResolveAssemblyReference.cache │ │ ├── RestWithASPNETUdemy.csproj.nuget.cache │ │ └── RestWithASPNETUdemy.csproj.nuget.g.targets │ ├── appsettings.json │ ├── bin │ │ └── Debug │ │ │ └── netcoreapp1.1 │ │ │ ├── RestWithASPNETUdemy.dll │ │ │ ├── RestWithASPNETUdemy.pdb │ │ │ ├── RestWithASPNETUdemy.runtimeconfig.dev.json │ │ │ └── RestWithASPNETUdemy.runtimeconfig.json │ └── appsettings.Development.json └── .vs │ └── RestWithASPNETUdemy │ └── v15 │ ├── .suo │ └── sqlite3 │ └── storage.ide ├── RestWithASPNETUdemy 06 - Adding Support To Database Migrations └── RestWithASPNETUdemy │ ├── db │ ├── migrations │ │ ├── V1_0_2__Alter_Table_Persons.sql │ │ ├── V1_0_3__Create_table_books.sql │ │ └── V1_0_1__Create_Table_Persons.sql │ └── dataset │ │ └── V1_0_5__Insert_data_in_persons.sql │ ├── appsettings.Development.json │ ├── Evolve.json │ ├── appsettings.json │ ├── Business │ └── IPersonBusiness.cs │ ├── Repository │ └── IPersonRepository.cs │ └── Program.cs ├── RestWithASPNETUdemy 01 - Calculator ├── .vs │ └── RestWithASPNETUdemy │ │ └── v15 │ │ ├── .suo │ │ └── sqlite3 │ │ └── storage.ide └── RestWithASPNETUdemy │ ├── appsettings.json │ └── appsettings.Development.json ├── RestWithASPNETUdemy 02 - Using Diferent Verbs └── RestWithASPNETUdemy │ ├── appsettings.json │ ├── appsettings.Development.json │ ├── db │ └── script.sql │ ├── Services │ └── IPersonService.cs │ └── Model │ └── Person.cs ├── RestWithASPNETUdemy 05 - Spliting Logic └── RestWithASPNETUdemy │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── db │ └── script.sql │ ├── Business │ └── IPersonBusiness.cs │ ├── Repository │ └── IPersonRepository.cs │ ├── Model │ ├── Person.cs │ └── Context │ │ └── MySQLContext.cs │ └── Program.cs ├── RestWithASPNETUdemy 03 - Connecting To Database └── RestWithASPNETUdemy │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── db │ └── script.sql │ ├── Services │ └── IPersonService.cs │ ├── Model │ ├── Person.cs │ └── Context │ │ └── MySQLContext.cs │ └── Program.cs └── RestWithASPNETUdemy 04 - Versioning Endpoints └── RestWithASPNETUdemy ├── appsettings.Development.json ├── appsettings.json ├── db └── script.sql ├── Services └── IPersonService.cs ├── Model ├── Person.cs └── Context │ └── MySQLContext.cs └── Program.cs /Images/udemy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leandrocgsi/RestWithASP-NETUdemy/HEAD/Images/udemy.png -------------------------------------------------------------------------------- /RestWithASPNETUdemy 21 - Connecting To Other Databases/README.md: -------------------------------------------------------------------------------- 1 | http://localhost:{port}/api/persons/v1 -------------------------------------------------------------------------------- /Documents/VO Pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leandrocgsi/RestWithASP-NETUdemy/HEAD/Documents/VO Pattern.png -------------------------------------------------------------------------------- /RestWithASPNETUdemy 11 - HATEOAS/RestWithASPNETUdemy/db/migrations/V1_0_6__Drop_table_books.sql: -------------------------------------------------------------------------------- 1 | drop table `books`; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 12 - Swagger/RestWithASPNETUdemy/db/migrations/V1_0_6__Drop_table_books.sql: -------------------------------------------------------------------------------- 1 | drop table `books`; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 15 - PagedSearch/RestWithASPNETUdemy/db/migrations/V1_0_6__Drop_table_books.sql: -------------------------------------------------------------------------------- 1 | drop table `books`; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 19 - Bash Script/RestWithASPNETUdemy/db/migrations/V1_0_6__Drop_table_books.sql: -------------------------------------------------------------------------------- 1 | drop table `books`; -------------------------------------------------------------------------------- /Documents/Architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leandrocgsi/RestWithASP-NETUdemy/HEAD/Documents/Architecture.png -------------------------------------------------------------------------------- /RestWithASPNETUdemy 09 - Data Contract/RestWithASPNETUdemy/db/migrations/V1_0_6__Drop_table_books.sql: -------------------------------------------------------------------------------- 1 | drop table `books`; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 13 - Authentication/RestWithASPNETUdemy/db/migrations/V1_0_6__Drop_table_books.sql: -------------------------------------------------------------------------------- 1 | drop table `books`; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 16 - Binary Files/RestWithASPNETUdemy/db/migrations/V1_0_6__Drop_table_books.sql: -------------------------------------------------------------------------------- 1 | drop table `books`; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 17 - Enable Docker/RestWithASPNETUdemy/db/migrations/V1_0_6__Drop_table_books.sql: -------------------------------------------------------------------------------- 1 | drop table `books`; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 20 - Final Release/RestWithASPNETUdemy/db/migrations/V1_0_6__Drop_table_books.sql: -------------------------------------------------------------------------------- 1 | drop table `books`; -------------------------------------------------------------------------------- /Documents/HTTP_StatusCodes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leandrocgsi/RestWithASP-NETUdemy/HEAD/Documents/HTTP_StatusCodes.png -------------------------------------------------------------------------------- /RestWithASPNETUdemy 10 - Content Negotiation/RestWithASPNETUdemy/db/migrations/V1_0_6__Drop_table_books.sql: -------------------------------------------------------------------------------- 1 | drop table `books`; -------------------------------------------------------------------------------- /RestWithASPNETUdemy Extra Sessions/RestWithASPNETUdemy HATEOAS Done On The Nail/README.md: -------------------------------------------------------------------------------- 1 | Waiting for a quick description 2 | -------------------------------------------------------------------------------- /Documents/Generic Repository.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leandrocgsi/RestWithASP-NETUdemy/HEAD/Documents/Generic Repository.png -------------------------------------------------------------------------------- /RestWithASPNETUdemy 08 - Working With Value Objects/RestWithASPNETUdemy/db/migrations/V1_0_6__Drop_table_books.sql: -------------------------------------------------------------------------------- 1 | drop table `books`; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 14 - PATH Verb And Query Param/RestWithASPNETUdemy/db/migrations/V1_0_6__Drop_table_books.sql: -------------------------------------------------------------------------------- 1 | drop table `books`; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 18 - Starting With Dump File/RestWithASPNETUdemy/db/migrations/V1_0_6__Drop_table_books.sql: -------------------------------------------------------------------------------- 1 | drop table `books`; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 07 - Working With Generic Repository/RestWithASPNETUdemy/db/migrations/V1_0_6__Drop_table_books.sql: -------------------------------------------------------------------------------- 1 | drop table `books`; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 00 - Scafold/RestWithASPNETUdemy/obj/Debug/netcoreapp1.1/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 00 - Scafold/RestWithASPNETUdemy/obj/Debug/netcoreapp1.1/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 00 - Scafold/RestWithASPNETUdemy/obj/Debug/netcoreapp1.1/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Documents/HTTP_StatusCodes_By_Group.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leandrocgsi/RestWithASP-NETUdemy/HEAD/Documents/HTTP_StatusCodes_By_Group.png -------------------------------------------------------------------------------- /Documents/Understending RESTFul API's .pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leandrocgsi/RestWithASP-NETUdemy/HEAD/Documents/Understending RESTFul API's .pdf -------------------------------------------------------------------------------- /Images/banner_blog_udemy_course_aspnetcore.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leandrocgsi/RestWithASP-NETUdemy/HEAD/Images/banner_blog_udemy_course_aspnetcore.jpg -------------------------------------------------------------------------------- /RestWithASPNETUdemy Extra Sessions/RestWithASPNETUdemy HATEOAS Done On The Nail/RestWithASPNETUdemy/db/migrations/V1_0_6__Drop_table_books.sql: -------------------------------------------------------------------------------- 1 | drop table `books`; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 00 - Scafold/RestWithASPNETUdemy/obj/Debug/netcoreapp1.1/RestWithASPNETUdemy.AssemblyInfoInputs.cache: -------------------------------------------------------------------------------- 1 | 3b4d138f5b5fe1ba0856a9db43dd70542d1c8331 2 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 00 - Scafold/RestWithASPNETUdemy/obj/Debug/netcoreapp1.1/RestWithASPNETUdemy.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | 436aa016fd3c9706c7629ba7e1449564bae589f6 2 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 11 - HATEOAS/RestWithASPNETUdemy/db/migrations/V1_0_2__Alter_Table_Persons.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE `persons` CHANGE `Id` `Id` INT(10) AUTO_INCREMENT PRIMARY KEY; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 12 - Swagger/RestWithASPNETUdemy/db/migrations/V1_0_2__Alter_Table_Persons.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE `persons` CHANGE `Id` `Id` INT(10) AUTO_INCREMENT PRIMARY KEY; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 17 - Enable Docker/RestWithASPNETUdemy/db/migrations/V1_0_2__Alter_Table_Persons.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE PERSONS CHANGE ID ID INT(10) AUTO_INCREMENT PRIMARY KEY; -------------------------------------------------------------------------------- /RestWithASPNETUdemy Extra Sessions/RestWithASPNETUdemy Authentication Get User Principal/RestWithASPNETUdemy/db/migrations/V1_0_6__Drop_table_books.sql: -------------------------------------------------------------------------------- 1 | drop table `books`; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 09 - Data Contract/RestWithASPNETUdemy/db/migrations/V1_0_2__Alter_Table_Persons.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE `persons` CHANGE `Id` `Id` INT(10) AUTO_INCREMENT PRIMARY KEY; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 15 - PagedSearch/RestWithASPNETUdemy/db/migrations/V1_0_2__Alter_Table_Persons.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE `persons` CHANGE `Id` `Id` INT(10) AUTO_INCREMENT PRIMARY KEY; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 16 - Binary Files/RestWithASPNETUdemy/db/migrations/V1_0_2__Alter_Table_Persons.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE `persons` CHANGE `Id` `Id` INT(10) AUTO_INCREMENT PRIMARY KEY; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 19 - Bash Script/RestWithASPNETUdemy/db/migrations/V1_0_2__Alter_Table_Persons.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE `persons` CHANGE `Id` `Id` INT(10) AUTO_INCREMENT PRIMARY KEY; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 20 - Final Release/RestWithASPNETUdemy/db/migrations/V1_0_2__Alter_Table_Persons.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE `persons` CHANGE `Id` `Id` INT(10) AUTO_INCREMENT PRIMARY KEY; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 13 - Authentication/RestWithASPNETUdemy/db/migrations/V1_0_2__Alter_Table_Persons.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE `persons` CHANGE `Id` `Id` INT(10) AUTO_INCREMENT PRIMARY KEY; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 10 - Content Negotiation/RestWithASPNETUdemy/db/migrations/V1_0_2__Alter_Table_Persons.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE `persons` CHANGE `Id` `Id` INT(10) AUTO_INCREMENT PRIMARY KEY; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 18 - Starting With Dump File/RestWithASPNETUdemy/db/migrations/V1_0_2__Alter_Table_Persons.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE `persons` CHANGE `Id` `Id` INT(10) AUTO_INCREMENT PRIMARY KEY; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 08 - Working With Value Objects/RestWithASPNETUdemy/db/migrations/V1_0_2__Alter_Table_Persons.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE `persons` CHANGE `Id` `Id` INT(10) AUTO_INCREMENT PRIMARY KEY; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 14 - PATH Verb And Query Param/RestWithASPNETUdemy/db/migrations/V1_0_2__Alter_Table_Persons.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE `persons` CHANGE `Id` `Id` INT(10) AUTO_INCREMENT PRIMARY KEY; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 00 - Scafold/.vs/RestWithASPNETUdemy/v15/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leandrocgsi/RestWithASP-NETUdemy/HEAD/RestWithASPNETUdemy 00 - Scafold/.vs/RestWithASPNETUdemy/v15/.suo -------------------------------------------------------------------------------- /RestWithASPNETUdemy 07 - Working With Generic Repository/RestWithASPNETUdemy/db/migrations/V1_0_2__Alter_Table_Persons.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE `persons` CHANGE `Id` `Id` INT(10) AUTO_INCREMENT PRIMARY KEY; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 00 - Scafold/RestWithASPNETUdemy/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 06 - Adding Support To Database Migrations/RestWithASPNETUdemy/db/migrations/V1_0_2__Alter_Table_Persons.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE `persons` CHANGE `Id` `Id` INT(10) AUTO_INCREMENT PRIMARY KEY; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 17 - Enable Docker/.dockerignore: -------------------------------------------------------------------------------- 1 | .dockerignore 2 | .env 3 | .git 4 | .gitignore 5 | .vs 6 | .vscode 7 | docker-compose.yml 8 | docker-compose.*.yml 9 | */bin 10 | */obj 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 19 - Bash Script/.dockerignore: -------------------------------------------------------------------------------- 1 | .dockerignore 2 | .env 3 | .git 4 | .gitignore 5 | .vs 6 | .vscode 7 | docker-compose.yml 8 | docker-compose.*.yml 9 | */bin 10 | */obj 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 20 - Final Release/.dockerignore: -------------------------------------------------------------------------------- 1 | .dockerignore 2 | .env 3 | .git 4 | .gitignore 5 | .vs 6 | .vscode 7 | docker-compose.yml 8 | docker-compose.*.yml 9 | */bin 10 | */obj 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 01 - Calculator/.vs/RestWithASPNETUdemy/v15/.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leandrocgsi/RestWithASP-NETUdemy/HEAD/RestWithASPNETUdemy 01 - Calculator/.vs/RestWithASPNETUdemy/v15/.suo -------------------------------------------------------------------------------- /RestWithASPNETUdemy 01 - Calculator/RestWithASPNETUdemy/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 19 - Bash Script/RestWithASPNETUdemy/ci/init_database.sh: -------------------------------------------------------------------------------- 1 | for i in `find /home/database/ -name "*.sql" | sort --version-sort`; do mysql -udocker -pdocker rest_with_asp_net_udemy < $i; done; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 18 - Starting With Dump File/.dockerignore: -------------------------------------------------------------------------------- 1 | .dockerignore 2 | .env 3 | .git 4 | .gitignore 5 | .vs 6 | .vscode 7 | docker-compose.yml 8 | docker-compose.*.yml 9 | */bin 10 | */obj 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 20 - Final Release/RestWithASPNETUdemy/ci/init_database.sh: -------------------------------------------------------------------------------- 1 | for i in `find /home/database/ -name "*.sql" | sort --version-sort`; do mysql -udocker -pdocker rest_with_asp_net_udemy < $i; done; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 02 - Using Diferent Verbs/RestWithASPNETUdemy/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 20 - Final Release/RestWithASPNETUdemy/Migrations.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leandrocgsi/RestWithASP-NETUdemy/HEAD/RestWithASPNETUdemy 20 - Final Release/RestWithASPNETUdemy/Migrations.zip -------------------------------------------------------------------------------- /RestWithASPNETUdemy Extra Sessions/RestWithASPNETUdemy HATEOAS Done On The Nail/RestWithASPNETUdemy/db/migrations/V1_0_2__Alter_Table_Persons.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE `persons` CHANGE `Id` `Id` INT(10) AUTO_INCREMENT PRIMARY KEY; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 00 - Scafold/.vs/RestWithASPNETUdemy/v15/sqlite3/storage.ide: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leandrocgsi/RestWithASP-NETUdemy/HEAD/RestWithASPNETUdemy 00 - Scafold/.vs/RestWithASPNETUdemy/v15/sqlite3/storage.ide -------------------------------------------------------------------------------- /RestWithASPNETUdemy Extra Sessions/RestWithASPNETUdemy Authentication Get User Principal/RestWithASPNETUdemy/db/migrations/V1_0_2__Alter_Table_Persons.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE `persons` CHANGE `Id` `Id` INT(10) AUTO_INCREMENT PRIMARY KEY; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 17 - Enable Docker/docker-compose.override.yml: -------------------------------------------------------------------------------- 1 | version: '3.4' 2 | 3 | services: 4 | restwithaspnetudemy: 5 | environment: 6 | - ASPNETCORE_ENVIRONMENT=Development 7 | ports: 8 | - "80" 9 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 01 - Calculator/.vs/RestWithASPNETUdemy/v15/sqlite3/storage.ide: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leandrocgsi/RestWithASP-NETUdemy/HEAD/RestWithASPNETUdemy 01 - Calculator/.vs/RestWithASPNETUdemy/v15/sqlite3/storage.ide -------------------------------------------------------------------------------- /RestWithASPNETUdemy 21 - Connecting To Other Databases/RestWithASPNETUdemy/teste.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leandrocgsi/RestWithASP-NETUdemy/HEAD/RestWithASPNETUdemy 21 - Connecting To Other Databases/RestWithASPNETUdemy/teste.yml -------------------------------------------------------------------------------- /Documents/Building Modern RESTFul API's With ASP.NET Core - Architectural Overview.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leandrocgsi/RestWithASP-NETUdemy/HEAD/Documents/Building Modern RESTFul API's With ASP.NET Core - Architectural Overview.pdf -------------------------------------------------------------------------------- /RestWithASPNETUdemy 15 - PagedSearch/RestWithASPNETUdemy/db/dataset/V1_0_10__Insert_data_in_users.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `users` (`Login`, `AccessKey`) VALUES ('leandro', 'admin123'); 2 | INSERT INTO `users` (`Login`, `AccessKey`) VALUES ('flavio', 'user123'); -------------------------------------------------------------------------------- /RestWithASPNETUdemy 16 - Binary Files/RestWithASPNETUdemy/db/dataset/V1_0_10__Insert_data_in_users.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `users` (`Login`, `AccessKey`) VALUES ('leandro', 'admin123'); 2 | INSERT INTO `users` (`Login`, `AccessKey`) VALUES ('flavio', 'user123'); -------------------------------------------------------------------------------- /RestWithASPNETUdemy 19 - Bash Script/RestWithASPNETUdemy/Other/aspnet-life-cycles-events.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leandrocgsi/RestWithASP-NETUdemy/HEAD/RestWithASPNETUdemy 19 - Bash Script/RestWithASPNETUdemy/Other/aspnet-life-cycles-events.pdf -------------------------------------------------------------------------------- /RestWithASPNETUdemy 19 - Bash Script/RestWithASPNETUdemy/db/dataset/V1_0_10__Insert_data_in_users.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `users` (`Login`, `AccessKey`) VALUES ('leandro', 'admin123'); 2 | INSERT INTO `users` (`Login`, `AccessKey`) VALUES ('flavio', 'user123'); -------------------------------------------------------------------------------- /RestWithASPNETUdemy 00 - Scafold/RestWithASPNETUdemy/obj/RestWithASPNETUdemy.csproj.nuget.cache: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "dgSpecHash": "DcmoNC4NYV1DkGZkMryDtMXtJOcS0XbDs6ioUW6BVYE3FrR79j/SQ27Vw6hxr9Jq22JKCE4hnW8G1sFnMU0fXA==", 4 | "success": true 5 | } -------------------------------------------------------------------------------- /RestWithASPNETUdemy 13 - Authentication/RestWithASPNETUdemy/db/dataset/V1_0_10__Insert_data_in_users.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `users` (`Login`, `AccessKey`) VALUES ('leandro', 'admin123'); 2 | INSERT INTO `users` (`Login`, `AccessKey`) VALUES ('flavio', 'user123'); -------------------------------------------------------------------------------- /RestWithASPNETUdemy 16 - Binary Files/RestWithASPNETUdemy/Other/aspnet-life-cycles-events.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leandrocgsi/RestWithASP-NETUdemy/HEAD/RestWithASPNETUdemy 16 - Binary Files/RestWithASPNETUdemy/Other/aspnet-life-cycles-events.pdf -------------------------------------------------------------------------------- /RestWithASPNETUdemy 17 - Enable Docker/RestWithASPNETUdemy/Other/aspnet-life-cycles-events.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leandrocgsi/RestWithASP-NETUdemy/HEAD/RestWithASPNETUdemy 17 - Enable Docker/RestWithASPNETUdemy/Other/aspnet-life-cycles-events.pdf -------------------------------------------------------------------------------- /RestWithASPNETUdemy 17 - Enable Docker/RestWithASPNETUdemy/db/dataset/V1_0_10__Insert_data_in_users.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `users` (`Login`, `AccessKey`) VALUES ('leandro', 'admin123'); 2 | INSERT INTO `users` (`Login`, `AccessKey`) VALUES ('flavio', 'user123'); -------------------------------------------------------------------------------- /RestWithASPNETUdemy 20 - Final Release/RestWithASPNETUdemy/Other/aspnet-life-cycles-events.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leandrocgsi/RestWithASP-NETUdemy/HEAD/RestWithASPNETUdemy 20 - Final Release/RestWithASPNETUdemy/Other/aspnet-life-cycles-events.pdf -------------------------------------------------------------------------------- /RestWithASPNETUdemy 20 - Final Release/RestWithASPNETUdemy/db/dataset/V1_0_10__Insert_data_in_users.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `users` (`Login`, `AccessKey`) VALUES ('leandro', 'admin123'); 2 | INSERT INTO `users` (`Login`, `AccessKey`) VALUES ('flavio', 'user123'); -------------------------------------------------------------------------------- /RestWithASPNETUdemy 00 - Scafold/RestWithASPNETUdemy/bin/Debug/netcoreapp1.1/RestWithASPNETUdemy.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leandrocgsi/RestWithASP-NETUdemy/HEAD/RestWithASPNETUdemy 00 - Scafold/RestWithASPNETUdemy/bin/Debug/netcoreapp1.1/RestWithASPNETUdemy.dll -------------------------------------------------------------------------------- /RestWithASPNETUdemy 00 - Scafold/RestWithASPNETUdemy/bin/Debug/netcoreapp1.1/RestWithASPNETUdemy.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leandrocgsi/RestWithASP-NETUdemy/HEAD/RestWithASPNETUdemy 00 - Scafold/RestWithASPNETUdemy/bin/Debug/netcoreapp1.1/RestWithASPNETUdemy.pdb -------------------------------------------------------------------------------- /RestWithASPNETUdemy 00 - Scafold/RestWithASPNETUdemy/obj/Debug/netcoreapp1.1/RestWithASPNETUdemy.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leandrocgsi/RestWithASP-NETUdemy/HEAD/RestWithASPNETUdemy 00 - Scafold/RestWithASPNETUdemy/obj/Debug/netcoreapp1.1/RestWithASPNETUdemy.dll -------------------------------------------------------------------------------- /RestWithASPNETUdemy 00 - Scafold/RestWithASPNETUdemy/obj/Debug/netcoreapp1.1/RestWithASPNETUdemy.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leandrocgsi/RestWithASP-NETUdemy/HEAD/RestWithASPNETUdemy 00 - Scafold/RestWithASPNETUdemy/obj/Debug/netcoreapp1.1/RestWithASPNETUdemy.pdb -------------------------------------------------------------------------------- /RestWithASPNETUdemy 14 - PATH Verb And Query Param/RestWithASPNETUdemy/db/dataset/V1_0_10__Insert_data_in_users.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `users` (`Login`, `AccessKey`) VALUES ('leandro', 'admin123'); 2 | INSERT INTO `users` (`Login`, `AccessKey`) VALUES ('flavio', 'user123'); -------------------------------------------------------------------------------- /RestWithASPNETUdemy 17 - Enable Docker/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.4' 2 | 3 | services: 4 | restwithaspnetudemy: 5 | image: ${DOCKER_REGISTRY}restwithaspnetudemy 6 | build: 7 | context: . 8 | dockerfile: RestWithASPNETUdemy/Dockerfile 9 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 18 - Starting With Dump File/RestWithASPNETUdemy/db/dataset/V1_0_10__Insert_data_in_users.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `users` (`Login`, `AccessKey`) VALUES ('leandro', 'admin123'); 2 | INSERT INTO `users` (`Login`, `AccessKey`) VALUES ('flavio', 'user123'); -------------------------------------------------------------------------------- /RestWithASPNETUdemy 18 - Starting With Dump File/RestWithASPNETUdemy/Other/aspnet-life-cycles-events.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leandrocgsi/RestWithASP-NETUdemy/HEAD/RestWithASPNETUdemy 18 - Starting With Dump File/RestWithASPNETUdemy/Other/aspnet-life-cycles-events.pdf -------------------------------------------------------------------------------- /RestWithASPNETUdemy 16 - Binary Files/RestWithASPNETUdemy/Business/IFileBusiness.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | 3 | namespace RestWithASPNETUdemy.Business 4 | { 5 | public interface IFileBusiness 6 | { 7 | byte[] GetPDFFile(); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 19 - Bash Script/RestWithASPNETUdemy/Business/IFileBusiness.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | 3 | namespace RestWithASPNETUdemy.Business 4 | { 5 | public interface IFileBusiness 6 | { 7 | byte[] GetPDFFile(); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 17 - Enable Docker/RestWithASPNETUdemy/Business/IFileBusiness.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | 3 | namespace RestWithASPNETUdemy.Business 4 | { 5 | public interface IFileBusiness 6 | { 7 | byte[] GetPDFFile(); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 20 - Final Release/RestWithASPNETUdemy/Business/IFileBusiness.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | 3 | namespace RestWithASPNETUdemy.Business 4 | { 5 | public interface IFileBusiness 6 | { 7 | byte[] GetPDFFile(); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 21 - Connecting To Other Databases/DataAccessMSSqlProvider/sql_database/create_database.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leandrocgsi/RestWithASP-NETUdemy/HEAD/RestWithASPNETUdemy 21 - Connecting To Other Databases/DataAccessMSSqlProvider/sql_database/create_database.sql -------------------------------------------------------------------------------- /RestWithASPNETUdemy 00 - Scafold/RestWithASPNETUdemy/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 11 - HATEOAS/RestWithASPNETUdemy/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 12 - Swagger/RestWithASPNETUdemy/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 15 - PagedSearch/RestWithASPNETUdemy/Business/ILoginBusiness.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | 3 | namespace RestWithASPNETUdemy.Business 4 | { 5 | public interface ILoginBusiness 6 | { 7 | object FindByLogin(UserVO user); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 16 - Binary Files/RestWithASPNETUdemy/Business/ILoginBusiness.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | 3 | namespace RestWithASPNETUdemy.Business 4 | { 5 | public interface ILoginBusiness 6 | { 7 | object FindByLogin(UserVO user); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 17 - Enable Docker/RestWithASPNETUdemy/Business/ILoginBusiness.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | 3 | namespace RestWithASPNETUdemy.Business 4 | { 5 | public interface ILoginBusiness 6 | { 7 | object FindByLogin(UserVO user); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 18 - Starting With Dump File/RestWithASPNETUdemy/Business/IFileBusiness.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | 3 | namespace RestWithASPNETUdemy.Business 4 | { 5 | public interface IFileBusiness 6 | { 7 | byte[] GetPDFFile(); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 19 - Bash Script/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mysql:5.7.22 2 | EXPOSE 3306 3 | COPY ./RestWithASPNETUdemy/db/migrations/ /home/database/ 4 | COPY ./RestWithASPNETUdemy/db/dataset/ /home/database/ 5 | COPY ./RestWithASPNETUdemy/ci/init_database.sh /docker-entrypoint-initdb.d/init_database.sh -------------------------------------------------------------------------------- /RestWithASPNETUdemy 19 - Bash Script/RestWithASPNETUdemy/Business/ILoginBusiness.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | 3 | namespace RestWithASPNETUdemy.Business 4 | { 5 | public interface ILoginBusiness 6 | { 7 | object FindByLogin(UserVO user); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 20 - Final Release/RestWithASPNETUdemy/Business/ILoginBusiness.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | 3 | namespace RestWithASPNETUdemy.Business 4 | { 5 | public interface ILoginBusiness 6 | { 7 | object FindByLogin(UserVO user); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 01 - Calculator/RestWithASPNETUdemy/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 09 - Data Contract/RestWithASPNETUdemy/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 13 - Authentication/RestWithASPNETUdemy/Business/ILoginBusiness.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | 3 | namespace RestWithASPNETUdemy.Business 4 | { 5 | public interface ILoginBusiness 6 | { 7 | object FindByLogin(UserVO user); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 15 - PagedSearch/RestWithASPNETUdemy/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 16 - Binary Files/RestWithASPNETUdemy/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 17 - Enable Docker/RestWithASPNETUdemy/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 19 - Bash Script/RestWithASPNETUdemy/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 20 - Final Release/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM mysql:5.7.22 2 | EXPOSE 3306 3 | COPY ./RestWithASPNETUdemy/db/migrations/ /home/database/ 4 | COPY ./RestWithASPNETUdemy/db/dataset/ /home/database/ 5 | COPY ./RestWithASPNETUdemy/ci/init_database.sh /docker-entrypoint-initdb.d/init_database.sh -------------------------------------------------------------------------------- /RestWithASPNETUdemy 20 - Final Release/RestWithASPNETUdemy/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 05 - Spliting Logic/RestWithASPNETUdemy/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 13 - Authentication/RestWithASPNETUdemy/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 18 - Starting With Dump File/RestWithASPNETUdemy/Business/ILoginBusiness.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | 3 | namespace RestWithASPNETUdemy.Business 4 | { 5 | public interface ILoginBusiness 6 | { 7 | object FindByLogin(UserVO user); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy Extra Sessions/RestWithASPNETUdemy Authentication Get User Principal/RestWithASPNETUdemy/db/dataset/V1_0_10__Insert_data_in_users.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `users` (`Login`, `AccessKey`) VALUES ('leandro', 'admin123'); 2 | INSERT INTO `users` (`Login`, `AccessKey`) VALUES ('flavio', 'user123'); -------------------------------------------------------------------------------- /RestWithASPNETUdemy 02 - Using Diferent Verbs/RestWithASPNETUdemy/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 03 - Connecting To Database/RestWithASPNETUdemy/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 04 - Versioning Endpoints/RestWithASPNETUdemy/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 10 - Content Negotiation/RestWithASPNETUdemy/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 14 - PATH Verb And Query Param/RestWithASPNETUdemy/Business/ILoginBusiness.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | 3 | namespace RestWithASPNETUdemy.Business 4 | { 5 | public interface ILoginBusiness 6 | { 7 | object FindByLogin(UserVO user); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 18 - Starting With Dump File/RestWithASPNETUdemy/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 00 - Scafold/RestWithASPNETUdemy/bin/Debug/netcoreapp1.1/RestWithASPNETUdemy.runtimeconfig.dev.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeOptions": { 3 | "additionalProbingPaths": [ 4 | "C:\\Users\\LEANDRO\\.dotnet\\store\\|arch|\\|tfm|", 5 | "C:\\Users\\LEANDRO\\.nuget\\packages" 6 | ] 7 | } 8 | } -------------------------------------------------------------------------------- /RestWithASPNETUdemy 08 - Working With Value Objects/RestWithASPNETUdemy/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 14 - PATH Verb And Query Param/RestWithASPNETUdemy/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 07 - Working With Generic Repository/RestWithASPNETUdemy/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 21 - Connecting To Other Databases/RestWithASPNETUdemy/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 06 - Adding Support To Database Migrations/RestWithASPNETUdemy/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 11 - HATEOAS/RestWithASPNETUdemy/db/dataset/V1_0_5__Insert_data_in_persons.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `persons` (`FirstName`, `LastName`, `Address`, `Gender`) VALUES 2 | ('Leandro', 'Costa', 'Uberlândia - Minas Gerais - Brasil', 'Male'), 3 | ('Flávio', 'Costa', 'Patos de Minas - Minas Gerais - Brasil', 'Male'); 4 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 12 - Swagger/RestWithASPNETUdemy/db/dataset/V1_0_5__Insert_data_in_persons.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `persons` (`FirstName`, `LastName`, `Address`, `Gender`) VALUES 2 | ('Leandro', 'Costa', 'Uberlândia - Minas Gerais - Brasil', 'Male'), 3 | ('Flávio', 'Costa', 'Patos de Minas - Minas Gerais - Brasil', 'Male'); 4 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 15 - PagedSearch/RestWithASPNETUdemy/Data/VO/UserVO.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace RestWithASPNETUdemy.Model 4 | { 5 | public class UserVO 6 | { 7 | public string Login { get; set; } 8 | public string AccessKey { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 15 - PagedSearch/RestWithASPNETUdemy/db/migrations/V1_0_9__Create_table_users.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `users` ( 2 | `ID` INT(10) NOT NULL AUTO_INCREMENT, 3 | `Login` VARCHAR(50) UNIQUE NOT NULL, 4 | `AccessKey` VARCHAR(50) NOT NULL, 5 | PRIMARY KEY (`ID`) 6 | ) 7 | COLLATE='latin1_swedish_ci' 8 | ENGINE=InnoDB; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 16 - Binary Files/RestWithASPNETUdemy/Data/VO/UserVO.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace RestWithASPNETUdemy.Model 4 | { 5 | public class UserVO 6 | { 7 | public string Login { get; set; } 8 | public string AccessKey { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 17 - Enable Docker/RestWithASPNETUdemy/Data/VO/UserVO.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace RestWithASPNETUdemy.Model 4 | { 5 | public class UserVO 6 | { 7 | public string Login { get; set; } 8 | public string AccessKey { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 19 - Bash Script/RestWithASPNETUdemy/Data/VO/UserVO.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace RestWithASPNETUdemy.Model 4 | { 5 | public class UserVO 6 | { 7 | public string Login { get; set; } 8 | public string AccessKey { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 19 - Bash Script/RestWithASPNETUdemy/db/migrations/V1_0_9__Create_table_users.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `users` ( 2 | `ID` INT(10) NOT NULL AUTO_INCREMENT, 3 | `Login` VARCHAR(50) UNIQUE NOT NULL, 4 | `AccessKey` VARCHAR(50) NOT NULL, 5 | PRIMARY KEY (`ID`) 6 | ) 7 | COLLATE='latin1_swedish_ci' 8 | ENGINE=InnoDB; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 19 - Bash Script/RestWithASPNETUdemy/evolve.json: -------------------------------------------------------------------------------- 1 | { 2 | "Evolve.Driver": "MySQL.Data", 3 | "Evolve.ConnectionString": "Server=db;Port=3306;Database=rest_with_asp_net_udemy;Uid=user;Pwd=user;", 4 | "Evolve.Locations": "db", 5 | "Evolve.Command": "", 6 | "Evolve.Placeholder.table4": "table_4" 7 | } -------------------------------------------------------------------------------- /RestWithASPNETUdemy 20 - Final Release/RestWithASPNETUdemy/Data/VO/UserVO.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace RestWithASPNETUdemy.Model 4 | { 5 | public class UserVO 6 | { 7 | public string Login { get; set; } 8 | public string AccessKey { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 20 - Final Release/RestWithASPNETUdemy/evolve.json: -------------------------------------------------------------------------------- 1 | { 2 | "Evolve.Driver": "MySQL.Data", 3 | "Evolve.ConnectionString": "Server=db;Port=3306;Database=rest_with_asp_net_udemy;Uid=user;Pwd=user;", 4 | "Evolve.Locations": "db", 5 | "Evolve.Command": "", 6 | "Evolve.Placeholder.table4": "table_4" 7 | } -------------------------------------------------------------------------------- /RestWithASPNETUdemy 09 - Data Contract/RestWithASPNETUdemy/db/dataset/V1_0_5__Insert_data_in_persons.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `persons` (`FirstName`, `LastName`, `Address`, `Gender`) VALUES 2 | ('Leandro', 'Costa', 'Uberlândia - Minas Gerais - Brasil', 'Male'), 3 | ('Flávio', 'Costa', 'Patos de Minas - Minas Gerais - Brasil', 'Male'); 4 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 11 - HATEOAS/RestWithASPNETUdemy/Data/Converter/IParser.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace RestWithASPNETUdemy.Data.Converter 4 | { 5 | public interface IParser 6 | { 7 | D Parse(O origin); 8 | List ParseList(List origin); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 12 - Swagger/RestWithASPNETUdemy/Data/Converter/IParser.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace RestWithASPNETUdemy.Data.Converter 4 | { 5 | public interface IParser 6 | { 7 | D Parse(O origin); 8 | List ParseList(List origin); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 13 - Authentication/RestWithASPNETUdemy/Data/VO/UserVO.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace RestWithASPNETUdemy.Model 4 | { 5 | public class UserVO 6 | { 7 | public string Login { get; set; } 8 | public string AccessKey { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 13 - Authentication/RestWithASPNETUdemy/db/migrations/V1_0_9__Create_table_users.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `users` ( 2 | `ID` INT(10) NOT NULL AUTO_INCREMENT, 3 | `Login` VARCHAR(50) UNIQUE NOT NULL, 4 | `AccessKey` VARCHAR(50) NOT NULL, 5 | PRIMARY KEY (`ID`) 6 | ) 7 | COLLATE='latin1_swedish_ci' 8 | ENGINE=InnoDB; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 15 - PagedSearch/RestWithASPNETUdemy/db/dataset/V1_0_5__Insert_data_in_persons.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `persons` (`FirstName`, `LastName`, `Address`, `Gender`) VALUES 2 | ('Leandro', 'Costa', 'Uberlândia - Minas Gerais - Brasil', 'Male'), 3 | ('Flávio', 'Costa', 'Patos de Minas - Minas Gerais - Brasil', 'Male'); 4 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 16 - Binary Files/RestWithASPNETUdemy/db/dataset/V1_0_5__Insert_data_in_persons.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `persons` (`FirstName`, `LastName`, `Address`, `Gender`) VALUES 2 | ('Leandro', 'Costa', 'Uberlândia - Minas Gerais - Brasil', 'Male'), 3 | ('Flávio', 'Costa', 'Patos de Minas - Minas Gerais - Brasil', 'Male'); 4 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 16 - Binary Files/RestWithASPNETUdemy/db/migrations/V1_0_9__Create_table_users.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `users` ( 2 | `ID` INT(10) NOT NULL AUTO_INCREMENT, 3 | `Login` VARCHAR(50) UNIQUE NOT NULL, 4 | `AccessKey` VARCHAR(50) NOT NULL, 5 | PRIMARY KEY (`ID`) 6 | ) 7 | COLLATE='latin1_swedish_ci' 8 | ENGINE=InnoDB; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 17 - Enable Docker/RestWithASPNETUdemy/db/dataset/V1_0_5__Insert_data_in_persons.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `persons` (`FirstName`, `LastName`, `Address`, `Gender`) VALUES 2 | ('Leandro', 'Costa', 'Uberlândia - Minas Gerais - Brasil', 'Male'), 3 | ('Flávio', 'Costa', 'Patos de Minas - Minas Gerais - Brasil', 'Male'); 4 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 17 - Enable Docker/RestWithASPNETUdemy/db/migrations/V1_0_9__Create_table_users.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `users` ( 2 | `ID` INT(10) NOT NULL AUTO_INCREMENT, 3 | `Login` VARCHAR(50) UNIQUE NOT NULL, 4 | `AccessKey` VARCHAR(50) NOT NULL, 5 | PRIMARY KEY (`ID`) 6 | ) 7 | COLLATE='latin1_swedish_ci' 8 | ENGINE=InnoDB; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 19 - Bash Script/RestWithASPNETUdemy/db/dataset/V1_0_5__Insert_data_in_persons.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `persons` (`FirstName`, `LastName`, `Address`, `Gender`) VALUES 2 | ('Leandro', 'Costa', 'Uberlândia - Minas Gerais - Brasil', 'Male'), 3 | ('Flávio', 'Costa', 'Patos de Minas - Minas Gerais - Brasil', 'Male'); 4 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 20 - Final Release/RestWithASPNETUdemy/db/dataset/V1_0_5__Insert_data_in_persons.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `persons` (`FirstName`, `LastName`, `Address`, `Gender`) VALUES 2 | ('Leandro', 'Costa', 'Uberlândia - Minas Gerais - Brasil', 'Male'), 3 | ('Flávio', 'Costa', 'Patos de Minas - Minas Gerais - Brasil', 'Male'); 4 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 20 - Final Release/RestWithASPNETUdemy/db/migrations/V1_0_9__Create_table_users.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `users` ( 2 | `ID` INT(10) NOT NULL AUTO_INCREMENT, 3 | `Login` VARCHAR(50) UNIQUE NOT NULL, 4 | `AccessKey` VARCHAR(50) NOT NULL, 5 | PRIMARY KEY (`ID`) 6 | ) 7 | COLLATE='latin1_swedish_ci' 8 | ENGINE=InnoDB; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 00 - Scafold/RestWithASPNETUdemy/obj/Debug/netcoreapp1.1/RestWithASPNETUdemy.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leandrocgsi/RestWithASP-NETUdemy/HEAD/RestWithASPNETUdemy 00 - Scafold/RestWithASPNETUdemy/obj/Debug/netcoreapp1.1/RestWithASPNETUdemy.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /RestWithASPNETUdemy 09 - Data Contract/RestWithASPNETUdemy/Data/Converter/IParser.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace RestWithASPNETUdemy.Data.Converter 4 | { 5 | public interface IParser 6 | { 7 | D Parse(O origin); 8 | List ParseList(List origin); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 13 - Authentication/RestWithASPNETUdemy/Data/Converter/IParser.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace RestWithASPNETUdemy.Data.Converter 4 | { 5 | public interface IParser 6 | { 7 | D Parse(O origin); 8 | List ParseList(List origin); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 13 - Authentication/RestWithASPNETUdemy/db/dataset/V1_0_5__Insert_data_in_persons.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `persons` (`FirstName`, `LastName`, `Address`, `Gender`) VALUES 2 | ('Leandro', 'Costa', 'Uberlândia - Minas Gerais - Brasil', 'Male'), 3 | ('Flávio', 'Costa', 'Patos de Minas - Minas Gerais - Brasil', 'Male'); 4 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 15 - PagedSearch/RestWithASPNETUdemy/Data/Converter/IParser.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace RestWithASPNETUdemy.Data.Converter 4 | { 5 | public interface IParser 6 | { 7 | D Parse(O origin); 8 | List ParseList(List origin); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 15 - PagedSearch/RestWithASPNETUdemy/Repository/IUserRepository.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IUserRepository 7 | { 8 | User FindByLogin(string login); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 16 - Binary Files/RestWithASPNETUdemy/Data/Converter/IParser.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace RestWithASPNETUdemy.Data.Converter 4 | { 5 | public interface IParser 6 | { 7 | D Parse(O origin); 8 | List ParseList(List origin); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 16 - Binary Files/RestWithASPNETUdemy/Repository/IUserRepository.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IUserRepository 7 | { 8 | User FindByLogin(string login); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 17 - Enable Docker/RestWithASPNETUdemy/Data/Converter/IParser.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace RestWithASPNETUdemy.Data.Converter 4 | { 5 | public interface IParser 6 | { 7 | D Parse(O origin); 8 | List ParseList(List origin); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 18 - Starting With Dump File/RestWithASPNETUdemy/Data/VO/UserVO.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace RestWithASPNETUdemy.Model 4 | { 5 | public class UserVO 6 | { 7 | public string Login { get; set; } 8 | public string AccessKey { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 18 - Starting With Dump File/RestWithASPNETUdemy/evolve.json: -------------------------------------------------------------------------------- 1 | { 2 | "Evolve.Driver": "MySQL.Data", 3 | "Evolve.ConnectionString": "Server=db;Port=3306;Database=rest_with_asp_net_udemy;Uid=user;Pwd=user;", 4 | "Evolve.Locations": "db", 5 | "Evolve.Command": "", 6 | "Evolve.Placeholder.table4": "table_4" 7 | } -------------------------------------------------------------------------------- /RestWithASPNETUdemy 19 - Bash Script/RestWithASPNETUdemy/Data/Converter/IParser.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace RestWithASPNETUdemy.Data.Converter 4 | { 5 | public interface IParser 6 | { 7 | D Parse(O origin); 8 | List ParseList(List origin); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 19 - Bash Script/RestWithASPNETUdemy/Repository/IUserRepository.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IUserRepository 7 | { 8 | User FindByLogin(string login); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 20 - Final Release/RestWithASPNETUdemy/Data/Converter/IParser.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace RestWithASPNETUdemy.Data.Converter 4 | { 5 | public interface IParser 6 | { 7 | D Parse(O origin); 8 | List ParseList(List origin); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 10 - Content Negotiation/RestWithASPNETUdemy/Data/Converter/IParser.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace RestWithASPNETUdemy.Data.Converter 4 | { 5 | public interface IParser 6 | { 7 | D Parse(O origin); 8 | List ParseList(List origin); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 10 - Content Negotiation/RestWithASPNETUdemy/db/dataset/V1_0_5__Insert_data_in_persons.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `persons` (`FirstName`, `LastName`, `Address`, `Gender`) VALUES 2 | ('Leandro', 'Costa', 'Uberlândia - Minas Gerais - Brasil', 'Male'), 3 | ('Flávio', 'Costa', 'Patos de Minas - Minas Gerais - Brasil', 'Male'); 4 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 13 - Authentication/RestWithASPNETUdemy/Repository/IUserRepository.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IUserRepository 7 | { 8 | User FindByLogin(string login); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 14 - PATH Verb And Query Param/RestWithASPNETUdemy/Data/VO/UserVO.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace RestWithASPNETUdemy.Model 4 | { 5 | public class UserVO 6 | { 7 | public string Login { get; set; } 8 | public string AccessKey { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 14 - PATH Verb And Query Param/RestWithASPNETUdemy/db/migrations/V1_0_9__Create_table_users.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `users` ( 2 | `ID` INT(10) NOT NULL AUTO_INCREMENT, 3 | `Login` VARCHAR(50) UNIQUE NOT NULL, 4 | `AccessKey` VARCHAR(50) NOT NULL, 5 | PRIMARY KEY (`ID`) 6 | ) 7 | COLLATE='latin1_swedish_ci' 8 | ENGINE=InnoDB; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 17 - Enable Docker/RestWithASPNETUdemy/Repository/IUserRepository.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IUserRepository 7 | { 8 | User FindByLogin(string login); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 18 - Starting With Dump File/RestWithASPNETUdemy/db/Evolve.json: -------------------------------------------------------------------------------- 1 | { 2 | "Evolve.Driver": "MySQL.Data", 3 | "Evolve.ConnectionString": "Server=db;Port=3306;Database=rest_with_asp_net_udemy;Uid=root;Pwd=user;", 4 | "Evolve.Locations": "db", 5 | "Evolve.Command": "", 6 | "Evolve.Placeholder.table4": "table_4" 7 | } -------------------------------------------------------------------------------- /RestWithASPNETUdemy 18 - Starting With Dump File/RestWithASPNETUdemy/db/dataset/V1_0_5__Insert_data_in_persons.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `persons` (`FirstName`, `LastName`, `Address`, `Gender`) VALUES 2 | ('Leandro', 'Costa', 'Uberlândia - Minas Gerais - Brasil', 'Male'), 3 | ('Flávio', 'Costa', 'Patos de Minas - Minas Gerais - Brasil', 'Male'); 4 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 18 - Starting With Dump File/RestWithASPNETUdemy/db/migrations/V1_0_9__Create_table_users.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `users` ( 2 | `ID` INT(10) NOT NULL AUTO_INCREMENT, 3 | `Login` VARCHAR(50) UNIQUE NOT NULL, 4 | `AccessKey` VARCHAR(50) NOT NULL, 5 | PRIMARY KEY (`ID`) 6 | ) 7 | COLLATE='latin1_swedish_ci' 8 | ENGINE=InnoDB; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 20 - Final Release/RestWithASPNETUdemy/Repository/IUserRepository.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IUserRepository 7 | { 8 | User FindByLogin(string login); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 08 - Working With Value Objects/RestWithASPNETUdemy/db/dataset/V1_0_5__Insert_data_in_persons.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `persons` (`FirstName`, `LastName`, `Address`, `Gender`) VALUES 2 | ('Leandro', 'Costa', 'Uberlândia - Minas Gerais - Brasil', 'Male'), 3 | ('Flávio', 'Costa', 'Patos de Minas - Minas Gerais - Brasil', 'Male'); 4 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 11 - HATEOAS/RestWithASPNETUdemy/Evolve.json: -------------------------------------------------------------------------------- 1 | { 2 | "Evolve.Driver": "MySQL.Data", 3 | "Evolve.ConnectionString": "Server=localhost;Port=3306;Database=rest_with_asp_net_udemy;Uid=root;Pwd=;SslMode=none;", 4 | "Evolve.Locations": "db", 5 | "Evolve.Command": "migrate", 6 | "Evolve.Placeholder.table4": "table_4" 7 | } -------------------------------------------------------------------------------- /RestWithASPNETUdemy 11 - HATEOAS/RestWithASPNETUdemy/db/migrations/V1_0_7__Recreate_table_books.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `books` ( 2 | `id` INT(10) AUTO_INCREMENT PRIMARY KEY, 3 | `Author` longtext, 4 | `LaunchDate` datetime(6) NOT NULL, 5 | `Price` decimal(65,2) NOT NULL, 6 | `Title` longtext 7 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 8 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 12 - Swagger/RestWithASPNETUdemy/db/migrations/V1_0_7__Recreate_table_books.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `books` ( 2 | `id` INT(10) AUTO_INCREMENT PRIMARY KEY, 3 | `Author` longtext, 4 | `LaunchDate` datetime(6) NOT NULL, 5 | `Price` decimal(65,2) NOT NULL, 6 | `Title` longtext 7 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 8 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 14 - PATH Verb And Query Param/RestWithASPNETUdemy/Data/Converter/IParser.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace RestWithASPNETUdemy.Data.Converter 4 | { 5 | public interface IParser 6 | { 7 | D Parse(O origin); 8 | List ParseList(List origin); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 14 - PATH Verb And Query Param/RestWithASPNETUdemy/db/dataset/V1_0_5__Insert_data_in_persons.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `persons` (`FirstName`, `LastName`, `Address`, `Gender`) VALUES 2 | ('Leandro', 'Costa', 'Uberlândia - Minas Gerais - Brasil', 'Male'), 3 | ('Flávio', 'Costa', 'Patos de Minas - Minas Gerais - Brasil', 'Male'); 4 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 15 - PagedSearch/RestWithASPNETUdemy/Evolve.json: -------------------------------------------------------------------------------- 1 | { 2 | "Evolve.Driver": "MySQL.Data", 3 | "Evolve.ConnectionString": "Server=localhost;Port=3306;Database=rest_with_asp_net_udemy;Uid=root;Pwd=;SslMode=none;", 4 | "Evolve.Locations": "db", 5 | "Evolve.Command": "migrate", 6 | "Evolve.Placeholder.table4": "table_4" 7 | } -------------------------------------------------------------------------------- /RestWithASPNETUdemy 15 - PagedSearch/RestWithASPNETUdemy/db/migrations/V1_0_7__Recreate_table_books.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `books` ( 2 | `id` INT(10) AUTO_INCREMENT PRIMARY KEY, 3 | `Author` longtext, 4 | `LaunchDate` datetime(6) NOT NULL, 5 | `Price` decimal(65,2) NOT NULL, 6 | `Title` longtext 7 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 8 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 18 - Starting With Dump File/RestWithASPNETUdemy/Data/Converter/IParser.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace RestWithASPNETUdemy.Data.Converter 4 | { 5 | public interface IParser 6 | { 7 | D Parse(O origin); 8 | List ParseList(List origin); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 19 - Bash Script/RestWithASPNETUdemy/db/migrations/V1_0_7__Recreate_table_books.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `books` ( 2 | `id` INT(10) AUTO_INCREMENT PRIMARY KEY, 3 | `Author` longtext, 4 | `LaunchDate` datetime(6) NOT NULL, 5 | `Price` decimal(65,2) NOT NULL, 6 | `Title` longtext 7 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 8 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy Extra Sessions/RestWithASPNETUdemy Authentication Get User Principal/RestWithASPNETUdemy/Business/ILoginBusiness.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | 3 | namespace RestWithASPNETUdemy.Business 4 | { 5 | public interface ILoginBusiness 6 | { 7 | object FindByLogin(UserVO user); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy Extra Sessions/RestWithASPNETUdemy HATEOAS Done On The Nail/RestWithASPNETUdemy/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 07 - Working With Generic Repository/RestWithASPNETUdemy/db/dataset/V1_0_5__Insert_data_in_persons.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `persons` (`FirstName`, `LastName`, `Address`, `Gender`) VALUES 2 | ('Leandro', 'Costa', 'Uberlândia - Minas Gerais - Brasil', 'Male'), 3 | ('Flávio', 'Costa', 'Patos de Minas - Minas Gerais - Brasil', 'Male'); 4 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 08 - Working With Value Objects/RestWithASPNETUdemy/Data/Converter/IParser.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace RestWithASPNETUdemy.Data.Converter 4 | { 5 | public interface IParser 6 | { 7 | D Parse(O origin); 8 | List ParseList(List origin); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 09 - Data Contract/RestWithASPNETUdemy/Evolve.json: -------------------------------------------------------------------------------- 1 | { 2 | "Evolve.Driver": "MySQL.Data", 3 | "Evolve.ConnectionString": "Server=localhost;Port=3306;Database=rest_with_asp_net_udemy;Uid=root;Pwd=;SslMode=none;", 4 | "Evolve.Locations": "db", 5 | "Evolve.Command": "migrate", 6 | "Evolve.Placeholder.table4": "table_4" 7 | } -------------------------------------------------------------------------------- /RestWithASPNETUdemy 09 - Data Contract/RestWithASPNETUdemy/db/migrations/V1_0_7__Recreate_table_books.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `books` ( 2 | `id` INT(10) AUTO_INCREMENT PRIMARY KEY, 3 | `Author` longtext, 4 | `LaunchDate` datetime(6) NOT NULL, 5 | `Price` decimal(65,2) NOT NULL, 6 | `Title` longtext 7 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 8 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 12 - Swagger/RestWithASPNETUdemy/Evolve.json: -------------------------------------------------------------------------------- 1 | { 2 | "Evolve.Driver": "MySQL.Data", 3 | "Evolve.ConnectionString": "Server=localhost;Port=3306;Database=rest_with_asp_net_udemy;Uid=root;Pwd=admin123;SslMode=none;", 4 | "Evolve.Locations": "db", 5 | "Evolve.Command": "migrate", 6 | "Evolve.Placeholder.table4": "table_4" 7 | } -------------------------------------------------------------------------------- /RestWithASPNETUdemy 13 - Authentication/RestWithASPNETUdemy/Evolve.json: -------------------------------------------------------------------------------- 1 | { 2 | "Evolve.Driver": "MySQL.Data", 3 | "Evolve.ConnectionString": "Server=localhost;Port=3306;Database=rest_with_asp_net_udemy;Uid=root;Pwd=;SslMode=none;", 4 | "Evolve.Locations": "db", 5 | "Evolve.Command": "migrate", 6 | "Evolve.Placeholder.table4": "table_4" 7 | } -------------------------------------------------------------------------------- /RestWithASPNETUdemy 13 - Authentication/RestWithASPNETUdemy/db/migrations/V1_0_7__Recreate_table_books.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `books` ( 2 | `id` INT(10) AUTO_INCREMENT PRIMARY KEY, 3 | `Author` longtext, 4 | `LaunchDate` datetime(6) NOT NULL, 5 | `Price` decimal(65,2) NOT NULL, 6 | `Title` longtext 7 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 8 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 14 - PATH Verb And Query Param/RestWithASPNETUdemy/Repository/IUserRepository.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IUserRepository 7 | { 8 | User FindByLogin(string login); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 16 - Binary Files/RestWithASPNETUdemy/Evolve.json: -------------------------------------------------------------------------------- 1 | { 2 | "Evolve.Driver": "MySQL.Data", 3 | "Evolve.ConnectionString": "Server=localhost;Port=3306;Database=rest_with_asp_net_udemy;Uid=root;Pwd=;SslMode=none;", 4 | "Evolve.Locations": "db", 5 | "Evolve.Command": "migrate", 6 | "Evolve.Placeholder.table4": "table_4" 7 | } -------------------------------------------------------------------------------- /RestWithASPNETUdemy 16 - Binary Files/RestWithASPNETUdemy/db/migrations/V1_0_7__Recreate_table_books.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `books` ( 2 | `id` INT(10) AUTO_INCREMENT PRIMARY KEY, 3 | `Author` longtext, 4 | `LaunchDate` datetime(6) NOT NULL, 5 | `Price` decimal(65,2) NOT NULL, 6 | `Title` longtext 7 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 8 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 17 - Enable Docker/RestWithASPNETUdemy/db/migrations/V1_0_7__Recreate_table_books.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `books` ( 2 | `id` INT(10) AUTO_INCREMENT PRIMARY KEY, 3 | `Author` longtext, 4 | `LaunchDate` datetime(6) NOT NULL, 5 | `Price` decimal(65,2) NOT NULL, 6 | `Title` longtext 7 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 8 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 17 - Enable Docker/RestWithASPNETUdemy/evolve.json: -------------------------------------------------------------------------------- 1 | { 2 | "Evolve.Driver": "MySQL.Data", 3 | "Evolve.ConnectionString": "Server=localhost;Port=3306;Database=rest_with_asp_net_udemy;Uid=root;Pwd=;SslMode=none;", 4 | "Evolve.Locations": "db", 5 | "Evolve.Command": "migrate", 6 | "Evolve.Placeholder.table4": "table_4" 7 | } -------------------------------------------------------------------------------- /RestWithASPNETUdemy 18 - Starting With Dump File/RestWithASPNETUdemy/Repository/IUserRepository.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IUserRepository 7 | { 8 | User FindByLogin(string login); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 20 - Final Release/RestWithASPNETUdemy/db/migrations/V1_0_7__Recreate_table_books.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `books` ( 2 | `id` INT(10) AUTO_INCREMENT PRIMARY KEY, 3 | `Author` longtext, 4 | `LaunchDate` datetime(6) NOT NULL, 5 | `Price` decimal(65,2) NOT NULL, 6 | `Title` longtext 7 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 8 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy Extra Sessions/RestWithASPNETUdemy Authentication Get User Principal/RestWithASPNETUdemy/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "IncludeScopes": false, 4 | "LogLevel": { 5 | "Default": "Debug", 6 | "System": "Information", 7 | "Microsoft": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 05 - Spliting Logic/RestWithASPNETUdemy/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "MySqlConnection": { 3 | "MySqlConnectionString": "Server=localhost;DataBase=rest_with_asp_net_udemy;Uid=root;Pwd=" 4 | }, 5 | "Logging": { 6 | "IncludeScopes": false, 7 | "LogLevel": { 8 | "Default": "Warning" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 06 - Adding Support To Database Migrations/RestWithASPNETUdemy/db/dataset/V1_0_5__Insert_data_in_persons.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `persons` (`FirstName`, `LastName`, `Address`, `Gender`) VALUES 2 | ('Leandro', 'Costa', 'Uberlândia - Minas Gerais - Brasil', 'Male'), 3 | ('Flávio', 'Costa', 'Patos de Minas - Minas Gerais - Brasil', 'Male'); 4 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 10 - Content Negotiation/RestWithASPNETUdemy/Evolve.json: -------------------------------------------------------------------------------- 1 | { 2 | "Evolve.Driver": "MySQL.Data", 3 | "Evolve.ConnectionString": "Server=localhost;Port=3306;Database=rest_with_asp_net_udemy;Uid=root;Pwd=;SslMode=none;", 4 | "Evolve.Locations": "db", 5 | "Evolve.Command": "migrate", 6 | "Evolve.Placeholder.table4": "table_4" 7 | } -------------------------------------------------------------------------------- /RestWithASPNETUdemy 10 - Content Negotiation/RestWithASPNETUdemy/db/migrations/V1_0_7__Recreate_table_books.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `books` ( 2 | `id` INT(10) AUTO_INCREMENT PRIMARY KEY, 3 | `Author` longtext, 4 | `LaunchDate` datetime(6) NOT NULL, 5 | `Price` decimal(65,2) NOT NULL, 6 | `Title` longtext 7 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 8 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 04 - Versioning Endpoints/RestWithASPNETUdemy/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "MySqlConnection": { 3 | "MySqlConnectionString": "Server=localhost;DataBase=rest_with_asp_net_udemy;Uid=root;Pwd=" 4 | }, 5 | "Logging": { 6 | "IncludeScopes": false, 7 | "LogLevel": { 8 | "Default": "Warning" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 08 - Working With Value Objects/RestWithASPNETUdemy/Evolve.json: -------------------------------------------------------------------------------- 1 | { 2 | "Evolve.Driver": "MySQL.Data", 3 | "Evolve.ConnectionString": "Server=localhost;Port=3306;Database=rest_with_asp_net_udemy;Uid=root;Pwd=;SslMode=none;", 4 | "Evolve.Locations": "db", 5 | "Evolve.Command": "migrate", 6 | "Evolve.Placeholder.table4": "table_4" 7 | } -------------------------------------------------------------------------------- /RestWithASPNETUdemy 08 - Working With Value Objects/RestWithASPNETUdemy/db/migrations/V1_0_7__Recreate_table_books.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `books` ( 2 | `id` INT(10) AUTO_INCREMENT PRIMARY KEY, 3 | `Author` longtext, 4 | `LaunchDate` datetime(6) NOT NULL, 5 | `Price` decimal(65,2) NOT NULL, 6 | `Title` longtext 7 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 8 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 14 - PATH Verb And Query Param/RestWithASPNETUdemy/Evolve.json: -------------------------------------------------------------------------------- 1 | { 2 | "Evolve.Driver": "MySQL.Data", 3 | "Evolve.ConnectionString": "Server=localhost;Port=3306;Database=rest_with_asp_net_udemy;Uid=root;Pwd=;SslMode=none;", 4 | "Evolve.Locations": "db", 5 | "Evolve.Command": "migrate", 6 | "Evolve.Placeholder.table4": "table_4" 7 | } -------------------------------------------------------------------------------- /RestWithASPNETUdemy 14 - PATH Verb And Query Param/RestWithASPNETUdemy/db/migrations/V1_0_7__Recreate_table_books.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `books` ( 2 | `id` INT(10) AUTO_INCREMENT PRIMARY KEY, 3 | `Author` longtext, 4 | `LaunchDate` datetime(6) NOT NULL, 5 | `Price` decimal(65,2) NOT NULL, 6 | `Title` longtext 7 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 8 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 18 - Starting With Dump File/RestWithASPNETUdemy/db/migrations/V1_0_7__Recreate_table_books.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `books` ( 2 | `id` INT(10) AUTO_INCREMENT PRIMARY KEY, 3 | `Author` longtext, 4 | `LaunchDate` datetime(6) NOT NULL, 5 | `Price` decimal(65,2) NOT NULL, 6 | `Title` longtext 7 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 8 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 03 - Connecting To Database/RestWithASPNETUdemy/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "MySqlConnection": { 3 | "MySqlConnectionString": "Server=localhost;DataBase=rest_with_asp_net_udemy;Uid=root;Pwd=" 4 | }, 5 | "Logging": { 6 | "IncludeScopes": false, 7 | "LogLevel": { 8 | "Default": "Warning" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 07 - Working With Generic Repository/RestWithASPNETUdemy/Evolve.json: -------------------------------------------------------------------------------- 1 | { 2 | "Evolve.Driver": "MySQL.Data", 3 | "Evolve.ConnectionString": "Server=localhost;Port=3306;Database=rest_with_asp_net_udemy;Uid=root;Pwd=;SslMode=none;", 4 | "Evolve.Locations": "db", 5 | "Evolve.Command": "migrate", 6 | "Evolve.Placeholder.table4": "table_4" 7 | } -------------------------------------------------------------------------------- /RestWithASPNETUdemy 07 - Working With Generic Repository/RestWithASPNETUdemy/db/migrations/V1_0_7__Recreate_table_books.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `books` ( 2 | `id` INT(10) AUTO_INCREMENT PRIMARY KEY, 3 | `Author` longtext, 4 | `LaunchDate` datetime(6) NOT NULL, 5 | `Price` decimal(65,2) NOT NULL, 6 | `Title` longtext 7 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 8 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 02 - Using Diferent Verbs/RestWithASPNETUdemy/db/script.sql: -------------------------------------------------------------------------------- 1 | personsCREATE TABLE `persons` ( 2 | `Id` int(10) UNSIGNED NULL DEFAULT NULL, 3 | `FirstName` VARCHAR(50) NULL DEFAULT NULL, 4 | `LastName` VARCHAR(50) NULL DEFAULT NULL, 5 | `Address` VARCHAR(50) NULL DEFAULT NULL, 6 | `Gender` VARCHAR(50) NULL DEFAULT NULL 7 | ) 8 | ENGINE=InnoDB 9 | ; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 11 - HATEOAS/RestWithASPNETUdemy/db/migrations/V1_0_3__Create_table_books.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS `books` ( 2 | `id` varchar(127) NOT NULL, 3 | `Author` longtext, 4 | `LaunchDate` datetime(6) NOT NULL, 5 | `Price` decimal(65,2) NOT NULL, 6 | `Title` longtext, 7 | PRIMARY KEY (`id`) 8 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 9 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 12 - Swagger/RestWithASPNETUdemy/db/migrations/V1_0_3__Create_table_books.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS `books` ( 2 | `id` varchar(127) NOT NULL, 3 | `Author` longtext, 4 | `LaunchDate` datetime(6) NOT NULL, 5 | `Price` decimal(65,2) NOT NULL, 6 | `Title` longtext, 7 | PRIMARY KEY (`id`) 8 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 9 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 13 - Authentication/RestWithASPNETUdemy/Model/User.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace RestWithASPNETUdemy.Model 4 | { 5 | public class User 6 | { 7 | 8 | public long? Id { get; set; } 9 | public string Login { get; set; } 10 | public string AccessKey { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 15 - PagedSearch/RestWithASPNETUdemy/Model/User.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace RestWithASPNETUdemy.Model 4 | { 5 | public class User 6 | { 7 | 8 | public long? Id { get; set; } 9 | public string Login { get; set; } 10 | public string AccessKey { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 15 - PagedSearch/RestWithASPNETUdemy/db/migrations/V1_0_3__Create_table_books.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS `books` ( 2 | `id` varchar(127) NOT NULL, 3 | `Author` longtext, 4 | `LaunchDate` datetime(6) NOT NULL, 5 | `Price` decimal(65,2) NOT NULL, 6 | `Title` longtext, 7 | PRIMARY KEY (`id`) 8 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 9 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 16 - Binary Files/RestWithASPNETUdemy/Model/User.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace RestWithASPNETUdemy.Model 4 | { 5 | public class User 6 | { 7 | 8 | public long? Id { get; set; } 9 | public string Login { get; set; } 10 | public string AccessKey { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 17 - Enable Docker/RestWithASPNETUdemy/Model/User.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace RestWithASPNETUdemy.Model 4 | { 5 | public class User 6 | { 7 | 8 | public long? Id { get; set; } 9 | public string Login { get; set; } 10 | public string AccessKey { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 19 - Bash Script/RestWithASPNETUdemy/Model/Base/BaseEntity.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations.Schema; 2 | using System.Runtime.Serialization; 3 | 4 | namespace RestWithASPNETUdemy.Model.Base 5 | { 6 | public class BaseEntity 7 | { 8 | [Column("id")] 9 | public long? Id { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 19 - Bash Script/RestWithASPNETUdemy/db/migrations/V1_0_3__Create_table_books.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS `books` ( 2 | `id` varchar(127) NOT NULL, 3 | `Author` longtext, 4 | `LaunchDate` datetime(6) NOT NULL, 5 | `Price` decimal(65,2) NOT NULL, 6 | `Title` longtext, 7 | PRIMARY KEY (`id`) 8 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 9 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 06 - Adding Support To Database Migrations/RestWithASPNETUdemy/Evolve.json: -------------------------------------------------------------------------------- 1 | { 2 | "Evolve.Driver": "MySQL.Data", 3 | "Evolve.ConnectionString": "Server=localhost;Port=3306;Database=rest_with_asp_net_udemy;Uid=root;Pwd=;SslMode=none;", 4 | "Evolve.Locations": "db", 5 | "Evolve.Command": "migrate", 6 | "Evolve.Placeholder.table4": "table_4" 7 | } -------------------------------------------------------------------------------- /RestWithASPNETUdemy 09 - Data Contract/RestWithASPNETUdemy/db/migrations/V1_0_3__Create_table_books.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS `books` ( 2 | `id` varchar(127) NOT NULL, 3 | `Author` longtext, 4 | `LaunchDate` datetime(6) NOT NULL, 5 | `Price` decimal(65,2) NOT NULL, 6 | `Title` longtext, 7 | PRIMARY KEY (`id`) 8 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 9 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 11 - HATEOAS/RestWithASPNETUdemy/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "MySqlConnection": { 3 | "MySqlConnectionString": "Server=localhost;Port=3306;Database=rest_with_asp_net_udemy;Uid=root;Pwd=;SslMode=none;" 4 | }, 5 | "Logging": { 6 | "IncludeScopes": false, 7 | "LogLevel": { 8 | "Default": "Warning" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 13 - Authentication/RestWithASPNETUdemy/db/migrations/V1_0_3__Create_table_books.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS `books` ( 2 | `id` varchar(127) NOT NULL, 3 | `Author` longtext, 4 | `LaunchDate` datetime(6) NOT NULL, 5 | `Price` decimal(65,2) NOT NULL, 6 | `Title` longtext, 7 | PRIMARY KEY (`id`) 8 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 9 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 16 - Binary Files/RestWithASPNETUdemy/db/migrations/V1_0_3__Create_table_books.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS `books` ( 2 | `id` varchar(127) NOT NULL, 3 | `Author` longtext, 4 | `LaunchDate` datetime(6) NOT NULL, 5 | `Price` decimal(65,2) NOT NULL, 6 | `Title` longtext, 7 | PRIMARY KEY (`id`) 8 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 9 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 17 - Enable Docker/RestWithASPNETUdemy/db/migrations/V1_0_3__Create_table_books.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS `books` ( 2 | `id` varchar(127) NOT NULL, 3 | `Author` longtext, 4 | `LaunchDate` datetime(6) NOT NULL, 5 | `Price` decimal(65,2) NOT NULL, 6 | `Title` longtext, 7 | PRIMARY KEY (`id`) 8 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 9 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 20 - Final Release/RestWithASPNETUdemy/Model/Base/BaseEntity.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations.Schema; 2 | using System.Runtime.Serialization; 3 | 4 | namespace RestWithASPNETUdemy.Model.Base 5 | { 6 | public class BaseEntity 7 | { 8 | [Column("id")] 9 | public long? Id { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 20 - Final Release/RestWithASPNETUdemy/db/migrations/V1_0_3__Create_table_books.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS `books` ( 2 | `id` varchar(127) NOT NULL, 3 | `Author` longtext, 4 | `LaunchDate` datetime(6) NOT NULL, 5 | `Price` decimal(65,2) NOT NULL, 6 | `Title` longtext, 7 | PRIMARY KEY (`id`) 8 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 9 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy Extra Sessions/RestWithASPNETUdemy Authentication Get User Principal/RestWithASPNETUdemy/Data/VO/UserVO.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace RestWithASPNETUdemy.Model 4 | { 5 | public class UserVO 6 | { 7 | public string Login { get; set; } 8 | public string AccessKey { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy Extra Sessions/RestWithASPNETUdemy HATEOAS Done On The Nail/RestWithASPNETUdemy/Data/Converter/IParser.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace RestWithASPNETUdemy.Data.Converter 4 | { 5 | public interface IParser 6 | { 7 | D Parse(O origin); 8 | List ParseList(List origin); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy Extra Sessions/RestWithASPNETUdemy HATEOAS Done On The Nail/RestWithASPNETUdemy/db/dataset/V1_0_5__Insert_data_in_persons.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `persons` (`FirstName`, `LastName`, `Address`, `Gender`) VALUES 2 | ('Leandro', 'Costa', 'Uberlândia - Minas Gerais - Brasil', 'Male'), 3 | ('Flávio', 'Costa', 'Patos de Minas - Minas Gerais - Brasil', 'Male'); 4 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 00 - Scafold/RestWithASPNETUdemy/bin/Debug/netcoreapp1.1/RestWithASPNETUdemy.runtimeconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "runtimeOptions": { 3 | "tfm": "netcoreapp1.1", 4 | "framework": { 5 | "name": "Microsoft.NETCore.App", 6 | "version": "1.1.2" 7 | }, 8 | "configProperties": { 9 | "System.GC.Server": true 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /RestWithASPNETUdemy 09 - Data Contract/RestWithASPNETUdemy/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "MySqlConnection": { 3 | "MySqlConnectionString": "Server=localhost;Port=3306;Database=rest_with_asp_net_udemy;Uid=root;Pwd=;SslMode=none;" 4 | }, 5 | "Logging": { 6 | "IncludeScopes": false, 7 | "LogLevel": { 8 | "Default": "Warning" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 10 - Content Negotiation/RestWithASPNETUdemy/db/migrations/V1_0_3__Create_table_books.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS `books` ( 2 | `id` varchar(127) NOT NULL, 3 | `Author` longtext, 4 | `LaunchDate` datetime(6) NOT NULL, 5 | `Price` decimal(65,2) NOT NULL, 6 | `Title` longtext, 7 | PRIMARY KEY (`id`) 8 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 9 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 12 - Swagger/RestWithASPNETUdemy/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "MySqlConnection": { 3 | "MySqlConnectionString": "Server=localhost;Port=3306;Database=rest_with_asp_net_udemy;Uid=root;Pwd=admin123;SslMode=none;" 4 | }, 5 | "Logging": { 6 | "IncludeScopes": false, 7 | "LogLevel": { 8 | "Default": "Warning" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 14 - PATH Verb And Query Param/RestWithASPNETUdemy/Model/User.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace RestWithASPNETUdemy.Model 4 | { 5 | public class User 6 | { 7 | 8 | public long? Id { get; set; } 9 | public string Login { get; set; } 10 | public string AccessKey { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 15 - PagedSearch/RestWithASPNETUdemy/Security/Configuration/TokenConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace RestWithASPNETUdemy.Security.Configuration 2 | { 3 | public class TokenConfiguration 4 | { 5 | public string Audience { get; set; } 6 | public string Issuer { get; set; } 7 | public int Seconds { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 16 - Binary Files/RestWithASPNETUdemy/Security/Configuration/TokenConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace RestWithASPNETUdemy.Security.Configuration 2 | { 3 | public class TokenConfiguration 4 | { 5 | public string Audience { get; set; } 6 | public string Issuer { get; set; } 7 | public int Seconds { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 17 - Enable Docker/RestWithASPNETUdemy/Security/Configuration/TokenConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace RestWithASPNETUdemy.Security.Configuration 2 | { 3 | public class TokenConfiguration 4 | { 5 | public string Audience { get; set; } 6 | public string Issuer { get; set; } 7 | public int Seconds { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 19 - Bash Script/RestWithASPNETUdemy/Security/Configuration/TokenConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace RestWithASPNETUdemy.Security.Configuration 2 | { 3 | public class TokenConfiguration 4 | { 5 | public string Audience { get; set; } 6 | public string Issuer { get; set; } 7 | public int Seconds { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 20 - Final Release/RestWithASPNETUdemy/Security/Configuration/TokenConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace RestWithASPNETUdemy.Security.Configuration 2 | { 3 | public class TokenConfiguration 4 | { 5 | public string Audience { get; set; } 6 | public string Issuer { get; set; } 7 | public int Seconds { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy Extra Sessions/RestWithASPNETUdemy Authentication Get User Principal/RestWithASPNETUdemy/db/dataset/V1_0_5__Insert_data_in_persons.sql: -------------------------------------------------------------------------------- 1 | INSERT INTO `persons` (`FirstName`, `LastName`, `Address`, `Gender`) VALUES 2 | ('Leandro', 'Costa', 'Uberlândia - Minas Gerais - Brasil', 'Male'), 3 | ('Flávio', 'Costa', 'Patos de Minas - Minas Gerais - Brasil', 'Male'); 4 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy Extra Sessions/RestWithASPNETUdemy Authentication Get User Principal/RestWithASPNETUdemy/db/migrations/V1_0_9__Create_table_users.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `users` ( 2 | `ID` INT(10) NOT NULL AUTO_INCREMENT, 3 | `Login` VARCHAR(50) UNIQUE NOT NULL, 4 | `AccessKey` VARCHAR(50) NOT NULL, 5 | PRIMARY KEY (`ID`) 6 | ) 7 | COLLATE='latin1_swedish_ci' 8 | ENGINE=InnoDB; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 08 - Working With Value Objects/RestWithASPNETUdemy/db/migrations/V1_0_3__Create_table_books.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS `books` ( 2 | `id` varchar(127) NOT NULL, 3 | `Author` longtext, 4 | `LaunchDate` datetime(6) NOT NULL, 5 | `Price` decimal(65,2) NOT NULL, 6 | `Title` longtext, 7 | PRIMARY KEY (`id`) 8 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 9 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 10 - Content Negotiation/RestWithASPNETUdemy/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "MySqlConnection": { 3 | "MySqlConnectionString": "Server=localhost;Port=3306;Database=rest_with_asp_net_udemy;Uid=root;Pwd=;SslMode=none;" 4 | }, 5 | "Logging": { 6 | "IncludeScopes": false, 7 | "LogLevel": { 8 | "Default": "Warning" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 11 - HATEOAS/RestWithASPNETUdemy/db/migrations/V1_0_1__Create_Table_Persons.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `persons` ( 2 | `Id` int(10) UNSIGNED NULL DEFAULT NULL, 3 | `FirstName` VARCHAR(50) NULL DEFAULT NULL, 4 | `LastName` VARCHAR(50) NULL DEFAULT NULL, 5 | `Address` VARCHAR(50) NULL DEFAULT NULL, 6 | `Gender` VARCHAR(50) NULL DEFAULT NULL 7 | ) 8 | ENGINE=InnoDB 9 | ; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 12 - Swagger/RestWithASPNETUdemy/db/migrations/V1_0_1__Create_Table_Persons.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `persons` ( 2 | `Id` int(10) UNSIGNED NULL DEFAULT NULL, 3 | `FirstName` VARCHAR(50) NULL DEFAULT NULL, 4 | `LastName` VARCHAR(50) NULL DEFAULT NULL, 5 | `Address` VARCHAR(50) NULL DEFAULT NULL, 6 | `Gender` VARCHAR(50) NULL DEFAULT NULL 7 | ) 8 | ENGINE=InnoDB 9 | ; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 13 - Authentication/RestWithASPNETUdemy/Security/Configuration/TokenConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace RestWithASPNETUdemy.Security.Configuration 2 | { 3 | public class TokenConfiguration 4 | { 5 | public string Audience { get; set; } 6 | public string Issuer { get; set; } 7 | public int Seconds { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 14 - PATH Verb And Query Param/RestWithASPNETUdemy/db/migrations/V1_0_3__Create_table_books.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS `books` ( 2 | `id` varchar(127) NOT NULL, 3 | `Author` longtext, 4 | `LaunchDate` datetime(6) NOT NULL, 5 | `Price` decimal(65,2) NOT NULL, 6 | `Title` longtext, 7 | PRIMARY KEY (`id`) 8 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 9 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 15 - PagedSearch/RestWithASPNETUdemy/db/migrations/V1_0_1__Create_Table_Persons.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `persons` ( 2 | `Id` int(10) UNSIGNED NULL DEFAULT NULL, 3 | `FirstName` VARCHAR(50) NULL DEFAULT NULL, 4 | `LastName` VARCHAR(50) NULL DEFAULT NULL, 5 | `Address` VARCHAR(50) NULL DEFAULT NULL, 6 | `Gender` VARCHAR(50) NULL DEFAULT NULL 7 | ) 8 | ENGINE=InnoDB 9 | ; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 18 - Starting With Dump File/RestWithASPNETUdemy/db/migrations/V1_0_3__Create_table_books.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS `books` ( 2 | `id` varchar(127) NOT NULL, 3 | `Author` longtext, 4 | `LaunchDate` datetime(6) NOT NULL, 5 | `Price` decimal(65,2) NOT NULL, 6 | `Title` longtext, 7 | PRIMARY KEY (`id`) 8 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 9 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 19 - Bash Script/RestWithASPNETUdemy/db/migrations/V1_0_1__Create_Table_Persons.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `persons` ( 2 | `Id` int(10) UNSIGNED NULL DEFAULT NULL, 3 | `FirstName` VARCHAR(50) NULL DEFAULT NULL, 4 | `LastName` VARCHAR(50) NULL DEFAULT NULL, 5 | `Address` VARCHAR(50) NULL DEFAULT NULL, 6 | `Gender` VARCHAR(50) NULL DEFAULT NULL 7 | ) 8 | ENGINE=InnoDB 9 | ; -------------------------------------------------------------------------------- /RestWithASPNETUdemy Extra Sessions/RestWithASPNETUdemy Authentication Get User Principal/RestWithASPNETUdemy/Data/Converter/IParser.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace RestWithASPNETUdemy.Data.Converter 4 | { 5 | public interface IParser 6 | { 7 | D Parse(O origin); 8 | List ParseList(List origin); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 07 - Working With Generic Repository/RestWithASPNETUdemy/db/migrations/V1_0_3__Create_table_books.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS `books` ( 2 | `id` varchar(127) NOT NULL, 3 | `Author` longtext, 4 | `LaunchDate` datetime(6) NOT NULL, 5 | `Price` decimal(65,2) NOT NULL, 6 | `Title` longtext, 7 | PRIMARY KEY (`id`) 8 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 9 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 08 - Working With Value Objects/RestWithASPNETUdemy/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "MySqlConnection": { 3 | "MySqlConnectionString": "Server=localhost;Port=3306;Database=rest_with_asp_net_udemy;Uid=root;Pwd=;SslMode=none;" 4 | }, 5 | "Logging": { 6 | "IncludeScopes": false, 7 | "LogLevel": { 8 | "Default": "Warning" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 09 - Data Contract/RestWithASPNETUdemy/db/migrations/V1_0_1__Create_Table_Persons.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `persons` ( 2 | `Id` int(10) UNSIGNED NULL DEFAULT NULL, 3 | `FirstName` VARCHAR(50) NULL DEFAULT NULL, 4 | `LastName` VARCHAR(50) NULL DEFAULT NULL, 5 | `Address` VARCHAR(50) NULL DEFAULT NULL, 6 | `Gender` VARCHAR(50) NULL DEFAULT NULL 7 | ) 8 | ENGINE=InnoDB 9 | ; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 13 - Authentication/RestWithASPNETUdemy/db/migrations/V1_0_1__Create_Table_Persons.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `persons` ( 2 | `Id` int(10) UNSIGNED NULL DEFAULT NULL, 3 | `FirstName` VARCHAR(50) NULL DEFAULT NULL, 4 | `LastName` VARCHAR(50) NULL DEFAULT NULL, 5 | `Address` VARCHAR(50) NULL DEFAULT NULL, 6 | `Gender` VARCHAR(50) NULL DEFAULT NULL 7 | ) 8 | ENGINE=InnoDB 9 | ; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 16 - Binary Files/RestWithASPNETUdemy/db/migrations/V1_0_1__Create_Table_Persons.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `persons` ( 2 | `Id` int(10) UNSIGNED NULL DEFAULT NULL, 3 | `FirstName` VARCHAR(50) NULL DEFAULT NULL, 4 | `LastName` VARCHAR(50) NULL DEFAULT NULL, 5 | `Address` VARCHAR(50) NULL DEFAULT NULL, 6 | `Gender` VARCHAR(50) NULL DEFAULT NULL 7 | ) 8 | ENGINE=InnoDB 9 | ; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 17 - Enable Docker/RestWithASPNETUdemy/db/migrations/V1_0_1__Create_Table_Persons.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `persons` ( 2 | `Id` int(10) UNSIGNED NULL DEFAULT NULL, 3 | `FirstName` VARCHAR(50) NULL DEFAULT NULL, 4 | `LastName` VARCHAR(50) NULL DEFAULT NULL, 5 | `Address` VARCHAR(50) NULL DEFAULT NULL, 6 | `Gender` VARCHAR(50) NULL DEFAULT NULL 7 | ) 8 | ENGINE=InnoDB 9 | ; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 18 - Starting With Dump File/RestWithASPNETUdemy/Security/Configuration/TokenConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace RestWithASPNETUdemy.Security.Configuration 2 | { 3 | public class TokenConfiguration 4 | { 5 | public string Audience { get; set; } 6 | public string Issuer { get; set; } 7 | public int Seconds { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 20 - Final Release/RestWithASPNETUdemy/db/migrations/V1_0_1__Create_Table_Persons.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `persons` ( 2 | `Id` int(10) UNSIGNED NULL DEFAULT NULL, 3 | `FirstName` VARCHAR(50) NULL DEFAULT NULL, 4 | `LastName` VARCHAR(50) NULL DEFAULT NULL, 5 | `Address` VARCHAR(50) NULL DEFAULT NULL, 6 | `Gender` VARCHAR(50) NULL DEFAULT NULL 7 | ) 8 | ENGINE=InnoDB 9 | ; -------------------------------------------------------------------------------- /RestWithASPNETUdemy Extra Sessions/RestWithASPNETUdemy Authentication Get User Principal/RestWithASPNETUdemy/Repository/IUserRepository.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IUserRepository 7 | { 8 | User FindByLogin(string login); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy Extra Sessions/RestWithASPNETUdemy HATEOAS Done On The Nail/RestWithASPNETUdemy/Evolve.json: -------------------------------------------------------------------------------- 1 | { 2 | "Evolve.Driver": "MySQL.Data", 3 | "Evolve.ConnectionString": "Server=localhost;Port=3306;Database=rest_with_asp_net_udemy;Uid=root;Pwd=;SslMode=none;", 4 | "Evolve.Locations": "db", 5 | "Evolve.Command": "migrate", 6 | "Evolve.Placeholder.table4": "table_4" 7 | } -------------------------------------------------------------------------------- /RestWithASPNETUdemy Extra Sessions/RestWithASPNETUdemy HATEOAS Done On The Nail/RestWithASPNETUdemy/db/migrations/V1_0_7__Recreate_table_books.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `books` ( 2 | `id` INT(10) AUTO_INCREMENT PRIMARY KEY, 3 | `Author` longtext, 4 | `LaunchDate` datetime(6) NOT NULL, 5 | `Price` decimal(65,2) NOT NULL, 6 | `Title` longtext 7 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 8 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 07 - Working With Generic Repository/RestWithASPNETUdemy/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "MySqlConnection": { 3 | "MySqlConnectionString": "Server=localhost;Port=3306;Database=rest_with_asp_net_udemy;Uid=root;Pwd=;SslMode=none;" 4 | }, 5 | "Logging": { 6 | "IncludeScopes": false, 7 | "LogLevel": { 8 | "Default": "Warning" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 10 - Content Negotiation/RestWithASPNETUdemy/db/migrations/V1_0_1__Create_Table_Persons.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `persons` ( 2 | `Id` int(10) UNSIGNED NULL DEFAULT NULL, 3 | `FirstName` VARCHAR(50) NULL DEFAULT NULL, 4 | `LastName` VARCHAR(50) NULL DEFAULT NULL, 5 | `Address` VARCHAR(50) NULL DEFAULT NULL, 6 | `Gender` VARCHAR(50) NULL DEFAULT NULL 7 | ) 8 | ENGINE=InnoDB 9 | ; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 14 - PATH Verb And Query Param/RestWithASPNETUdemy/Security/Configuration/TokenConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace RestWithASPNETUdemy.Security.Configuration 2 | { 3 | public class TokenConfiguration 4 | { 5 | public string Audience { get; set; } 6 | public string Issuer { get; set; } 7 | public int Seconds { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 17 - Enable Docker/RestWithASPNETUdemy/Model/Base/BaseEntity.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace RestWithASPNETUdemy.Model.Base 4 | { 5 | // Contrato entre atributos 6 | // e a estrutura da tabela 7 | // [DataContract] 8 | public class BaseEntity 9 | { 10 | 11 | public long? Id { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 06 - Adding Support To Database Migrations/RestWithASPNETUdemy/db/migrations/V1_0_3__Create_table_books.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS `books` ( 2 | `id` varchar(127) NOT NULL, 3 | `Author` longtext, 4 | `LaunchDate` datetime(6) NOT NULL, 5 | `Price` decimal(65,2) NOT NULL, 6 | `Title` longtext, 7 | PRIMARY KEY (`id`) 8 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 9 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 08 - Working With Value Objects/RestWithASPNETUdemy/db/migrations/V1_0_1__Create_Table_Persons.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `persons` ( 2 | `Id` int(10) UNSIGNED NULL DEFAULT NULL, 3 | `FirstName` VARCHAR(50) NULL DEFAULT NULL, 4 | `LastName` VARCHAR(50) NULL DEFAULT NULL, 5 | `Address` VARCHAR(50) NULL DEFAULT NULL, 6 | `Gender` VARCHAR(50) NULL DEFAULT NULL 7 | ) 8 | ENGINE=InnoDB 9 | ; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 14 - PATH Verb And Query Param/RestWithASPNETUdemy/db/migrations/V1_0_1__Create_Table_Persons.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `persons` ( 2 | `Id` int(10) UNSIGNED NULL DEFAULT NULL, 3 | `FirstName` VARCHAR(50) NULL DEFAULT NULL, 4 | `LastName` VARCHAR(50) NULL DEFAULT NULL, 5 | `Address` VARCHAR(50) NULL DEFAULT NULL, 6 | `Gender` VARCHAR(50) NULL DEFAULT NULL 7 | ) 8 | ENGINE=InnoDB 9 | ; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 18 - Starting With Dump File/RestWithASPNETUdemy/db/migrations/V1_0_1__Create_Table_Persons.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `persons` ( 2 | `Id` int(10) UNSIGNED NULL DEFAULT NULL, 3 | `FirstName` VARCHAR(50) NULL DEFAULT NULL, 4 | `LastName` VARCHAR(50) NULL DEFAULT NULL, 5 | `Address` VARCHAR(50) NULL DEFAULT NULL, 6 | `Gender` VARCHAR(50) NULL DEFAULT NULL 7 | ) 8 | ENGINE=InnoDB 9 | ; -------------------------------------------------------------------------------- /RestWithASPNETUdemy Extra Sessions/RestWithASPNETUdemy Authentication Get User Principal/RestWithASPNETUdemy/Evolve.json: -------------------------------------------------------------------------------- 1 | { 2 | "Evolve.Driver": "MySQL.Data", 3 | "Evolve.ConnectionString": "Server=localhost;Port=3306;Database=rest_with_asp_net_udemy;Uid=root;Pwd=;SslMode=none;", 4 | "Evolve.Locations": "db", 5 | "Evolve.Command": "migrate", 6 | "Evolve.Placeholder.table4": "table_4" 7 | } -------------------------------------------------------------------------------- /RestWithASPNETUdemy Extra Sessions/RestWithASPNETUdemy Authentication Get User Principal/RestWithASPNETUdemy/db/migrations/V1_0_7__Recreate_table_books.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `books` ( 2 | `id` INT(10) AUTO_INCREMENT PRIMARY KEY, 3 | `Author` longtext, 4 | `LaunchDate` datetime(6) NOT NULL, 5 | `Price` decimal(65,2) NOT NULL, 6 | `Title` longtext 7 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 8 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 00 - Scafold/RestWithASPNETUdemy/obj/RestWithASPNETUdemy.csproj.nuget.g.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath) 5 | 6 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 06 - Adding Support To Database Migrations/RestWithASPNETUdemy/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "MySqlConnection": { 3 | "MySqlConnectionString": "Server=localhost;Port=3306;Database=rest_with_asp_net_udemy;Uid=root;Pwd=;SslMode=none;" 4 | }, 5 | "Logging": { 6 | "IncludeScopes": false, 7 | "LogLevel": { 8 | "Default": "Warning" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 07 - Working With Generic Repository/RestWithASPNETUdemy/db/migrations/V1_0_1__Create_Table_Persons.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `persons` ( 2 | `Id` int(10) UNSIGNED NULL DEFAULT NULL, 3 | `FirstName` VARCHAR(50) NULL DEFAULT NULL, 4 | `LastName` VARCHAR(50) NULL DEFAULT NULL, 5 | `Address` VARCHAR(50) NULL DEFAULT NULL, 6 | `Gender` VARCHAR(50) NULL DEFAULT NULL 7 | ) 8 | ENGINE=InnoDB 9 | ; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 19 - Bash Script/RestWithASPNETUdemy/Model/User.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations.Schema; 2 | 3 | namespace RestWithASPNETUdemy.Model 4 | { 5 | [Table("users")] 6 | public class User 7 | { 8 | 9 | public long? Id { get; set; } 10 | public string Login { get; set; } 11 | public string AccessKey { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 20 - Final Release/RestWithASPNETUdemy/Model/User.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations.Schema; 2 | 3 | namespace RestWithASPNETUdemy.Model 4 | { 5 | [Table("users")] 6 | public class User 7 | { 8 | 9 | public long? Id { get; set; } 10 | public string Login { get; set; } 11 | public string AccessKey { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy Extra Sessions/RestWithASPNETUdemy HATEOAS Done On The Nail/Hypermedia/Hypermedia.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 06 - Adding Support To Database Migrations/RestWithASPNETUdemy/db/migrations/V1_0_1__Create_Table_Persons.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `persons` ( 2 | `Id` int(10) UNSIGNED NULL DEFAULT NULL, 3 | `FirstName` VARCHAR(50) NULL DEFAULT NULL, 4 | `LastName` VARCHAR(50) NULL DEFAULT NULL, 5 | `Address` VARCHAR(50) NULL DEFAULT NULL, 6 | `Gender` VARCHAR(50) NULL DEFAULT NULL 7 | ) 8 | ENGINE=InnoDB 9 | ; -------------------------------------------------------------------------------- /RestWithASPNETUdemy Extra Sessions/RestWithASPNETUdemy HATEOAS Done On The Nail/RestWithASPNETUdemy/Model/Base/BaseEntity.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations.Schema; 2 | using System.Runtime.Serialization; 3 | 4 | namespace RestWithASPNETUdemy.Model.Base 5 | { 6 | public class BaseEntity 7 | { 8 | [Column("id")] 9 | public long? Id { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy Extra Sessions/RestWithASPNETUdemy HATEOAS Done On The Nail/RestWithASPNETUdemy/db/migrations/V1_0_3__Create_table_books.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS `books` ( 2 | `id` varchar(127) NOT NULL, 3 | `Author` longtext, 4 | `LaunchDate` datetime(6) NOT NULL, 5 | `Price` decimal(65,2) NOT NULL, 6 | `Title` longtext, 7 | PRIMARY KEY (`id`) 8 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 9 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 18 - Starting With Dump File/RestWithASPNETUdemy/Model/User.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations.Schema; 2 | 3 | namespace RestWithASPNETUdemy.Model 4 | { 5 | [Table("users")] 6 | public class User 7 | { 8 | 9 | public long? Id { get; set; } 10 | public string Login { get; set; } 11 | public string AccessKey { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy Extra Sessions/RestWithASPNETUdemy Authentication Get User Principal/RestWithASPNETUdemy/Model/User.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.Serialization; 2 | 3 | namespace RestWithASPNETUdemy.Model 4 | { 5 | public class User 6 | { 7 | 8 | public long? Id { get; set; } 9 | public string Login { get; set; } 10 | public string AccessKey { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy Extra Sessions/RestWithASPNETUdemy HATEOAS Done On The Nail/RestWithASPNETUdemy/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "MySqlConnection": { 3 | "MySqlConnectionString": "Server=localhost;Port=3306;Database=rest_with_asp_net_udemy;Uid=root;Pwd=;SslMode=none;" 4 | }, 5 | "Logging": { 6 | "IncludeScopes": false, 7 | "LogLevel": { 8 | "Default": "Warning" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy Extra Sessions/RestWithASPNETUdemy Authentication Get User Principal/RestWithASPNETUdemy/Model/Base/BaseEntity.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations.Schema; 2 | using System.Runtime.Serialization; 3 | 4 | namespace RestWithASPNETUdemy.Model.Base 5 | { 6 | public class BaseEntity 7 | { 8 | [Column("id")] 9 | public long? Id { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy Extra Sessions/RestWithASPNETUdemy Authentication Get User Principal/RestWithASPNETUdemy/db/migrations/V1_0_3__Create_table_books.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE IF NOT EXISTS `books` ( 2 | `id` varchar(127) NOT NULL, 3 | `Author` longtext, 4 | `LaunchDate` datetime(6) NOT NULL, 5 | `Price` decimal(65,2) NOT NULL, 6 | `Title` longtext, 7 | PRIMARY KEY (`id`) 8 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 9 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 09 - Data Contract/RestWithASPNETUdemy/Data/VO/PersonVO.cs: -------------------------------------------------------------------------------- 1 | namespace RestWithASPNETUdemy.Data.VO 2 | { 3 | public class PersonVO 4 | { 5 | public long? Id { get; set; } 6 | public string FirstName { get; set; } 7 | public string LastName { get; set; } 8 | public string Address { get; set; } 9 | public string Gender { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy Extra Sessions/RestWithASPNETUdemy Authentication Get User Principal/RestWithASPNETUdemy/Security/Configuration/TokenConfiguration.cs: -------------------------------------------------------------------------------- 1 | namespace RestWithASPNETUdemy.Security.Configuration 2 | { 3 | public class TokenConfiguration 4 | { 5 | public string Audience { get; set; } 6 | public string Issuer { get; set; } 7 | public int Seconds { get; set; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy Extra Sessions/RestWithASPNETUdemy HATEOAS Done On The Nail/RestWithASPNETUdemy/db/migrations/V1_0_1__Create_Table_Persons.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `persons` ( 2 | `Id` int(10) UNSIGNED NULL DEFAULT NULL, 3 | `FirstName` VARCHAR(50) NULL DEFAULT NULL, 4 | `LastName` VARCHAR(50) NULL DEFAULT NULL, 5 | `Address` VARCHAR(50) NULL DEFAULT NULL, 6 | `Gender` VARCHAR(50) NULL DEFAULT NULL 7 | ) 8 | ENGINE=InnoDB 9 | ; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 10 - Content Negotiation/RestWithASPNETUdemy/Data/VO/PersonVO.cs: -------------------------------------------------------------------------------- 1 | namespace RestWithASPNETUdemy.Data.VO 2 | { 3 | public class PersonVO 4 | { 5 | public long? Id { get; set; } 6 | public string FirstName { get; set; } 7 | public string LastName { get; set; } 8 | public string Address { get; set; } 9 | public string Gender { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy Extra Sessions/RestWithASPNETUdemy HATEOAS Done On The Nail/Hypermedia/Filters/HyperMediaFilterOptions.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Hypermedia.Abstract; 3 | 4 | namespace Hypermedia.Filters 5 | { 6 | public class HyperMediaFilterOptions 7 | { 8 | public List ObjectContentResponseEnricherList { get; set; } = new List(); 9 | } 10 | } -------------------------------------------------------------------------------- /RestWithASPNETUdemy 08 - Working With Value Objects/RestWithASPNETUdemy/Data/VO/PersonVO.cs: -------------------------------------------------------------------------------- 1 | namespace RestWithASPNETUdemy.Data.VO 2 | { 3 | public class PersonVO 4 | { 5 | public long? Id { get; set; } 6 | public string FirstName { get; set; } 7 | public string LastName { get; set; } 8 | public string Address { get; set; } 9 | public string Gender { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 17 - Enable Docker/RestWithASPNETUdemy/Model/Person.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model.Base; 2 | 3 | namespace RestWithASPNETUdemy.Model 4 | { 5 | public class Person : BaseEntity 6 | { 7 | public string FirstName { get; set; } 8 | public string LastName { get; set; } 9 | public string Address { get; set; } 10 | public string Gender { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy Extra Sessions/RestWithASPNETUdemy Authentication Get User Principal/RestWithASPNETUdemy/db/migrations/V1_0_1__Create_Table_Persons.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `persons` ( 2 | `Id` int(10) UNSIGNED NULL DEFAULT NULL, 3 | `FirstName` VARCHAR(50) NULL DEFAULT NULL, 4 | `LastName` VARCHAR(50) NULL DEFAULT NULL, 5 | `Address` VARCHAR(50) NULL DEFAULT NULL, 6 | `Gender` VARCHAR(50) NULL DEFAULT NULL 7 | ) 8 | ENGINE=InnoDB 9 | ; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 05 - Spliting Logic/RestWithASPNETUdemy/db/script.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `persons` ( 2 | `Id` int(10) UNSIGNED NULL DEFAULT NULL, 3 | `FirstName` VARCHAR(50) NULL DEFAULT NULL, 4 | `LastName` VARCHAR(50) NULL DEFAULT NULL, 5 | `Address` VARCHAR(50) NULL DEFAULT NULL, 6 | `Gender` VARCHAR(50) NULL DEFAULT NULL 7 | ) 8 | ENGINE=InnoDB 9 | ; 10 | 11 | ALTER TABLE PERSONS CHANGE ID ID INT(10) AUTO_INCREMENT PRIMARY KEY; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 04 - Versioning Endpoints/RestWithASPNETUdemy/db/script.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `persons` ( 2 | `Id` int(10) UNSIGNED NULL DEFAULT NULL, 3 | `FirstName` VARCHAR(50) NULL DEFAULT NULL, 4 | `LastName` VARCHAR(50) NULL DEFAULT NULL, 5 | `Address` VARCHAR(50) NULL DEFAULT NULL, 6 | `Gender` VARCHAR(50) NULL DEFAULT NULL 7 | ) 8 | ENGINE=InnoDB 9 | ; 10 | 11 | ALTER TABLE PERSONS CHANGE ID ID INT(10) AUTO_INCREMENT PRIMARY KEY; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 15 - PagedSearch/RestWithASPNETUdemy/Repository/Generic/IPersonRepository.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | using RestWithASPNETUdemy.Model.Base; 3 | using System.Collections.Generic; 4 | 5 | namespace RestWithASPNETUdemy.Repository.Generic 6 | { 7 | public interface IPersonRepository : IRepository 8 | { 9 | List FindByName(string fristName, string lastName); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 16 - Binary Files/RestWithASPNETUdemy/Repository/Generic/IPersonRepository.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | using RestWithASPNETUdemy.Model.Base; 3 | using System.Collections.Generic; 4 | 5 | namespace RestWithASPNETUdemy.Repository.Generic 6 | { 7 | public interface IPersonRepository : IRepository 8 | { 9 | List FindByName(string fristName, string lastName); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 17 - Enable Docker/RestWithASPNETUdemy/Model/Book.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model.Base; 2 | using System; 3 | 4 | namespace RestWithASPNETUdemy.Model 5 | { 6 | public class Book : BaseEntity 7 | { 8 | public string Title { get; set; } 9 | public string Author { get; set; } 10 | public decimal Price { get; set; } 11 | public DateTime LaunchDate { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /RestWithASPNETUdemy 19 - Bash Script/RestWithASPNETUdemy/Repository/Generic/IPersonRepository.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | using RestWithASPNETUdemy.Model.Base; 3 | using System.Collections.Generic; 4 | 5 | namespace RestWithASPNETUdemy.Repository.Generic 6 | { 7 | public interface IPersonRepository : IRepository 8 | { 9 | List FindByName(string fristName, string lastName); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 03 - Connecting To Database/RestWithASPNETUdemy/db/script.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `persons` ( 2 | `Id` int(10) UNSIGNED NULL DEFAULT NULL, 3 | `FirstName` VARCHAR(50) NULL DEFAULT NULL, 4 | `LastName` VARCHAR(50) NULL DEFAULT NULL, 5 | `Address` VARCHAR(50) NULL DEFAULT NULL, 6 | `Gender` VARCHAR(50) NULL DEFAULT NULL 7 | ) 8 | ENGINE=InnoDB 9 | ; 10 | 11 | ALTER TABLE PERSONS CHANGE ID ID INT(10) AUTO_INCREMENT PRIMARY KEY; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 08 - Working With Value Objects/RestWithASPNETUdemy/Data/VO/BookVO.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace RestWithASPNETUdemy.Data.VO 4 | { 5 | public class BookVO 6 | { 7 | public long? Id { get; set; } 8 | public string Title { get; set; } 9 | public string Author { get; set; } 10 | public decimal Price { get; set; } 11 | public DateTime LaunchDate { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /RestWithASPNETUdemy 17 - Enable Docker/RestWithASPNETUdemy/Repository/Generic/IPersonRepository.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | using RestWithASPNETUdemy.Model.Base; 3 | using System.Collections.Generic; 4 | 5 | namespace RestWithASPNETUdemy.Repository.Generic 6 | { 7 | public interface IPersonRepository : IRepository 8 | { 9 | List FindByName(string fristName, string lastName); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 20 - Final Release/RestWithASPNETUdemy/Repository/Generic/IPersonRepository.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | using RestWithASPNETUdemy.Model.Base; 3 | using System.Collections.Generic; 4 | 5 | namespace RestWithASPNETUdemy.Repository.Generic 6 | { 7 | public interface IPersonRepository : IRepository 8 | { 9 | List FindByName(string fristName, string lastName); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 21 - Connecting To Other Databases/RestWithASPNETUdemy/db/script.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `persons` ( 2 | `Id` int(10) UNSIGNED NULL DEFAULT NULL, 3 | `FirstName` VARCHAR(50) NULL DEFAULT NULL, 4 | `LastName` VARCHAR(50) NULL DEFAULT NULL, 5 | `Address` VARCHAR(50) NULL DEFAULT NULL, 6 | `Gender` VARCHAR(50) NULL DEFAULT NULL 7 | ) 8 | ENGINE=InnoDB 9 | ; 10 | 11 | ALTER TABLE PERSONS CHANGE ID ID INT(10) AUTO_INCREMENT PRIMARY KEY; -------------------------------------------------------------------------------- /RestWithASPNETUdemy 11 - HATEOAS/RestWithASPNETUdemy/Model/Base/BaseEntity.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations.Schema; 2 | using System.Runtime.Serialization; 3 | 4 | namespace RestWithASPNETUdemy.Model.Base 5 | { 6 | // Contrato entre atributos 7 | // e a estrutura da tabela 8 | // [DataContract] 9 | public class BaseEntity 10 | { 11 | [Column("id")] 12 | public long? Id { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 12 - Swagger/RestWithASPNETUdemy/Model/Base/BaseEntity.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations.Schema; 2 | using System.Runtime.Serialization; 3 | 4 | namespace RestWithASPNETUdemy.Model.Base 5 | { 6 | // Contrato entre atributos 7 | // e a estrutura da tabela 8 | // [DataContract] 9 | public class BaseEntity 10 | { 11 | [Column("id")] 12 | public long? Id { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 14 - PATH Verb And Query Param/RestWithASPNETUdemy/Repository/Generic/IPersonRepository.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | using RestWithASPNETUdemy.Model.Base; 3 | using System.Collections.Generic; 4 | 5 | namespace RestWithASPNETUdemy.Repository.Generic 6 | { 7 | public interface IPersonRepository : IRepository 8 | { 9 | List FindByName(string fristName, string lastName); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 18 - Starting With Dump File/RestWithASPNETUdemy/Repository/Generic/IPersonRepository.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | using RestWithASPNETUdemy.Model.Base; 3 | using System.Collections.Generic; 4 | 5 | namespace RestWithASPNETUdemy.Repository.Generic 6 | { 7 | public interface IPersonRepository : IRepository 8 | { 9 | List FindByName(string fristName, string lastName); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 21 - Connecting To Other Databases/DataAccessMySqlProvider/Context/MySQLContext.cs: -------------------------------------------------------------------------------- 1 | using DomainModel.Model; 2 | using Microsoft.EntityFrameworkCore; 3 | 4 | namespace DataAccessMySqlProvider.Context 5 | { 6 | public class MySQLContext : DbContext 7 | { 8 | public MySQLContext(DbContextOptions options) : base(options) {} 9 | 10 | public DbSet Persons { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 15 - PagedSearch/RestWithASPNETUdemy/Model/Base/BaseEntity.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations.Schema; 2 | using System.Runtime.Serialization; 3 | 4 | namespace RestWithASPNETUdemy.Model.Base 5 | { 6 | // Contrato entre atributos 7 | // e a estrutura da tabela 8 | // [DataContract] 9 | public class BaseEntity 10 | { 11 | [Column("id")] 12 | public long? Id { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 16 - Binary Files/RestWithASPNETUdemy/Model/Base/BaseEntity.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations.Schema; 2 | using System.Runtime.Serialization; 3 | 4 | namespace RestWithASPNETUdemy.Model.Base 5 | { 6 | // Contrato entre atributos 7 | // e a estrutura da tabela 8 | // [DataContract] 9 | public class BaseEntity 10 | { 11 | [Column("id")] 12 | public long? Id { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy Extra Sessions/RestWithASPNETUdemy HATEOAS Done On The Nail/Hypermedia/Constants/HttpActionVerb.cs: -------------------------------------------------------------------------------- 1 | namespace Hypermedia.Constants 2 | { 3 | public sealed class HttpActionVerb 4 | { 5 | public const string GET = "GET"; 6 | public const string POST = "POST"; 7 | public const string PUT = "PUT"; 8 | public const string DELETE = "DELETE"; 9 | public const string PATCH = "PATCH"; 10 | } 11 | } -------------------------------------------------------------------------------- /RestWithASPNETUdemy 09 - Data Contract/RestWithASPNETUdemy/Model/Base/BaseEntity.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations.Schema; 2 | using System.Runtime.Serialization; 3 | 4 | namespace RestWithASPNETUdemy.Model.Base 5 | { 6 | // Contrato entre atributos 7 | // e a estrutura da tabela 8 | // [DataContract] 9 | public class BaseEntity 10 | { 11 | [Column("id")] 12 | public long? Id { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 11 - HATEOAS/RestWithASPNETUdemy/Business/IBookBusiness.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Data.VO; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IBookBusiness 7 | { 8 | BookVO Create(BookVO book); 9 | BookVO FindById(long id); 10 | List FindAll(); 11 | BookVO Update(BookVO book); 12 | void Delete(long id); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 12 - Swagger/RestWithASPNETUdemy/Business/IBookBusiness.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Data.VO; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IBookBusiness 7 | { 8 | BookVO Create(BookVO book); 9 | BookVO FindById(long id); 10 | List FindAll(); 11 | BookVO Update(BookVO book); 12 | void Delete(long id); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 13 - Authentication/RestWithASPNETUdemy/Model/Base/BaseEntity.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations.Schema; 2 | using System.Runtime.Serialization; 3 | 4 | namespace RestWithASPNETUdemy.Model.Base 5 | { 6 | // Contrato entre atributos 7 | // e a estrutura da tabela 8 | // [DataContract] 9 | public class BaseEntity 10 | { 11 | [Column("id")] 12 | public long? Id { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 09 - Data Contract/RestWithASPNETUdemy/Business/IBookBusiness.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Data.VO; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IBookBusiness 7 | { 8 | BookVO Create(BookVO book); 9 | BookVO FindById(long id); 10 | List FindAll(); 11 | BookVO Update(BookVO book); 12 | void Delete(long id); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 10 - Content Negotiation/RestWithASPNETUdemy/Model/Base/BaseEntity.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations.Schema; 2 | using System.Runtime.Serialization; 3 | 4 | namespace RestWithASPNETUdemy.Model.Base 5 | { 6 | // Contrato entre atributos 7 | // e a estrutura da tabela 8 | // [DataContract] 9 | public class BaseEntity 10 | { 11 | [Column("id")] 12 | public long? Id { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 15 - PagedSearch/RestWithASPNETUdemy/Business/IBookBusiness.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Data.VO; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IBookBusiness 7 | { 8 | BookVO Create(BookVO book); 9 | BookVO FindById(long id); 10 | List FindAll(); 11 | BookVO Update(BookVO book); 12 | void Delete(long id); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 16 - Binary Files/RestWithASPNETUdemy/Business/IBookBusiness.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Data.VO; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IBookBusiness 7 | { 8 | BookVO Create(BookVO book); 9 | BookVO FindById(long id); 10 | List FindAll(); 11 | BookVO Update(BookVO book); 12 | void Delete(long id); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 17 - Enable Docker/RestWithASPNETUdemy/Business/IBookBusiness.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Data.VO; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IBookBusiness 7 | { 8 | BookVO Create(BookVO book); 9 | BookVO FindById(long id); 10 | List FindAll(); 11 | BookVO Update(BookVO book); 12 | void Delete(long id); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 19 - Bash Script/RestWithASPNETUdemy/Business/IBookBusiness.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Data.VO; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IBookBusiness 7 | { 8 | BookVO Create(BookVO book); 9 | BookVO FindById(long id); 10 | List FindAll(); 11 | BookVO Update(BookVO book); 12 | void Delete(long id); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 20 - Final Release/RestWithASPNETUdemy/Business/IBookBusiness.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Data.VO; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IBookBusiness 7 | { 8 | BookVO Create(BookVO book); 9 | BookVO FindById(long id); 10 | List FindAll(); 11 | BookVO Update(BookVO book); 12 | void Delete(long id); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 07 - Working With Generic Repository/RestWithASPNETUdemy/Business/IBookBusiness.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IBookBusiness 7 | { 8 | Book Create(Book book); 9 | Book FindById(long id); 10 | List FindAll(); 11 | Book Update(Book book); 12 | void Delete(long id); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 08 - Working With Value Objects/RestWithASPNETUdemy/Model/Base/BaseEntity.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations.Schema; 2 | using System.Runtime.Serialization; 3 | 4 | namespace RestWithASPNETUdemy.Model.Base 5 | { 6 | // Contrato entre atributos 7 | // e a estrutura da tabela 8 | // [DataContract] 9 | public class BaseEntity 10 | { 11 | [Column("id")] 12 | public long? Id { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 13 - Authentication/RestWithASPNETUdemy/Business/IBookBusiness.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Data.VO; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IBookBusiness 7 | { 8 | BookVO Create(BookVO book); 9 | BookVO FindById(long id); 10 | List FindAll(); 11 | BookVO Update(BookVO book); 12 | void Delete(long id); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 14 - PATH Verb And Query Param/RestWithASPNETUdemy/Model/Base/BaseEntity.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations.Schema; 2 | using System.Runtime.Serialization; 3 | 4 | namespace RestWithASPNETUdemy.Model.Base 5 | { 6 | // Contrato entre atributos 7 | // e a estrutura da tabela 8 | // [DataContract] 9 | public class BaseEntity 10 | { 11 | [Column("id")] 12 | public long? Id { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 18 - Starting With Dump File/RestWithASPNETUdemy/Model/Base/BaseEntity.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations.Schema; 2 | using System.Runtime.Serialization; 3 | 4 | namespace RestWithASPNETUdemy.Model.Base 5 | { 6 | // Contrato entre atributos 7 | // e a estrutura da tabela 8 | // [DataContract] 9 | public class BaseEntity 10 | { 11 | [Column("id")] 12 | public long? Id { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 05 - Spliting Logic/RestWithASPNETUdemy/Business/IPersonBusiness.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IPersonBusiness 7 | { 8 | Person Create(Person person); 9 | Person FindById(long id); 10 | List FindAll(); 11 | Person Update(Person person); 12 | void Delete(long id); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 07 - Working With Generic Repository/RestWithASPNETUdemy/Model/Base/BaseEntity.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations.Schema; 2 | using System.Runtime.Serialization; 3 | 4 | namespace RestWithASPNETUdemy.Model.Base 5 | { 6 | // Contrato entre atributos 7 | // e a estrutura da tabela 8 | // [DataContract] 9 | public class BaseEntity 10 | { 11 | [Column("id")] 12 | public long? Id { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 10 - Content Negotiation/RestWithASPNETUdemy/Business/IBookBusiness.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Data.VO; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IBookBusiness 7 | { 8 | BookVO Create(BookVO book); 9 | BookVO FindById(long id); 10 | List FindAll(); 11 | BookVO Update(BookVO book); 12 | void Delete(long id); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 18 - Starting With Dump File/RestWithASPNETUdemy/Business/IBookBusiness.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Data.VO; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IBookBusiness 7 | { 8 | BookVO Create(BookVO book); 9 | BookVO FindById(long id); 10 | List FindAll(); 11 | BookVO Update(BookVO book); 12 | void Delete(long id); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 21 - Connecting To Other Databases/DataAccessMSSqlProvider/Context/MSSQLContext.cs: -------------------------------------------------------------------------------- 1 | using DomainModel.Model; 2 | using Microsoft.EntityFrameworkCore; 3 | 4 | namespace DataAccessMSSqlServerProvider.Context 5 | { 6 | public class MSSQLServerContext : DbContext 7 | { 8 | public MSSQLServerContext(DbContextOptions options) : base(options) {} 9 | 10 | public DbSet Persons { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 02 - Using Diferent Verbs/RestWithASPNETUdemy/Services/IPersonService.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Services 5 | { 6 | public interface IPersonService 7 | { 8 | Person Create(Person person); 9 | Person FindById(long id); 10 | List FindAll(); 11 | Person Update(Person person); 12 | void Delete(long id); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 03 - Connecting To Database/RestWithASPNETUdemy/Services/IPersonService.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Services 5 | { 6 | public interface IPersonService 7 | { 8 | Person Create(Person person); 9 | Person FindById(long id); 10 | List FindAll(); 11 | Person Update(Person person); 12 | void Delete(long id); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 04 - Versioning Endpoints/RestWithASPNETUdemy/Services/IPersonService.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Services 5 | { 6 | public interface IPersonService 7 | { 8 | Person Create(Person person); 9 | Person FindById(long id); 10 | List FindAll(); 11 | Person Update(Person person); 12 | void Delete(long id); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 08 - Working With Value Objects/RestWithASPNETUdemy/Business/IBookBusiness.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Data.VO; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IBookBusiness 7 | { 8 | BookVO Create(BookVO book); 9 | BookVO FindById(long id); 10 | List FindAll(); 11 | BookVO Update(BookVO book); 12 | void Delete(long id); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 11 - HATEOAS/RestWithASPNETUdemy/Business/IPersonBusiness.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Data.VO; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IPersonBusiness 7 | { 8 | PersonVO Create(PersonVO person); 9 | PersonVO FindById(long id); 10 | List FindAll(); 11 | PersonVO Update(PersonVO person); 12 | void Delete(long id); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 12 - Swagger/RestWithASPNETUdemy/Business/IPersonBusiness.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Data.VO; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IPersonBusiness 7 | { 8 | PersonVO Create(PersonVO person); 9 | PersonVO FindById(long id); 10 | List FindAll(); 11 | PersonVO Update(PersonVO person); 12 | void Delete(long id); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 14 - PATH Verb And Query Param/RestWithASPNETUdemy/Business/IBookBusiness.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Data.VO; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IBookBusiness 7 | { 8 | BookVO Create(BookVO book); 9 | BookVO FindById(long id); 10 | List FindAll(); 11 | BookVO Update(BookVO book); 12 | void Delete(long id); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 21 - Connecting To Other Databases/RestWithASPNETUdemy/Business/IPersonBusiness.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using DomainModel.Model; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IPersonBusiness 7 | { 8 | Person Create(Person person); 9 | Person FindById(long id); 10 | List FindAll(); 11 | Person Update(Person person); 12 | void Delete(long id); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 09 - Data Contract/RestWithASPNETUdemy/Business/IPersonBusiness.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Data.VO; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IPersonBusiness 7 | { 8 | PersonVO Create(PersonVO person); 9 | PersonVO FindById(long id); 10 | List FindAll(); 11 | PersonVO Update(PersonVO person); 12 | void Delete(long id); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 07 - Working With Generic Repository/RestWithASPNETUdemy/Business/IPersonBusiness.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IPersonBusiness 7 | { 8 | Person Create(Person person); 9 | Person FindById(long id); 10 | List FindAll(); 11 | Person Update(Person person); 12 | void Delete(long id); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 13 - Authentication/RestWithASPNETUdemy/Business/IPersonBusiness.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Data.VO; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IPersonBusiness 7 | { 8 | PersonVO Create(PersonVO person); 9 | PersonVO FindById(long id); 10 | List FindAll(); 11 | PersonVO Update(PersonVO person); 12 | void Delete(long id); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy Extra Sessions/RestWithASPNETUdemy HATEOAS Done On The Nail/Hypermedia/Constants/ResponseTypeFormat.cs: -------------------------------------------------------------------------------- 1 | namespace Hypermedia.Constants 2 | { 3 | public sealed class ResponseTypeFormat 4 | { 5 | public const string DefaultGet = "application/json"; 6 | public const string DefaultPost = "application/json"; 7 | public const string DefaultPut = "application/json"; 8 | public const string DefaultPatch = "application/json"; 9 | } 10 | } -------------------------------------------------------------------------------- /RestWithASPNETUdemy 06 - Adding Support To Database Migrations/RestWithASPNETUdemy/Business/IPersonBusiness.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IPersonBusiness 7 | { 8 | Person Create(Person person); 9 | Person FindById(long id); 10 | List FindAll(); 11 | Person Update(Person person); 12 | void Delete(long id); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 10 - Content Negotiation/RestWithASPNETUdemy/Business/IPersonBusiness.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Data.VO; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IPersonBusiness 7 | { 8 | PersonVO Create(PersonVO person); 9 | PersonVO FindById(long id); 10 | List FindAll(); 11 | PersonVO Update(PersonVO person); 12 | void Delete(long id); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 21 - Connecting To Other Databases/DomainModel/Model/Repository/IPersonRepository.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace DomainModel.Model.Repository 4 | { 5 | public interface IPersonRepository 6 | { 7 | Person Create(Person person); 8 | Person FindById(long id); 9 | List FindAll(); 10 | Person Update(Person person); 11 | void Delete(long id); 12 | 13 | bool Exists(long? id); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 08 - Working With Value Objects/RestWithASPNETUdemy/Business/IPersonBusiness.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Data.VO; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IPersonBusiness 7 | { 8 | PersonVO Create(PersonVO person); 9 | PersonVO FindById(long id); 10 | List FindAll(); 11 | PersonVO Update(PersonVO person); 12 | void Delete(long id); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 15 - PagedSearch/RestWithASPNETUdemy/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "MySqlConnection": { 3 | "MySqlConnectionString": "Server=localhost;Port=3306;Database=rest_with_asp_net_udemy;Uid=root;Pwd=;SslMode=none;" 4 | }, 5 | "TokenConfigurations": { 6 | "Audience": "ExempleAudience", 7 | "Issuer": "ExempleIssuer", 8 | "Seconds": 1200 9 | }, 10 | "Logging": { 11 | "IncludeScopes": false, 12 | "LogLevel": { 13 | "Default": "Warning" 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 16 - Binary Files/RestWithASPNETUdemy/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "MySqlConnection": { 3 | "MySqlConnectionString": "Server=localhost;Port=3306;Database=rest_with_asp_net_udemy;Uid=root;Pwd=;SslMode=none;" 4 | }, 5 | "TokenConfigurations": { 6 | "Audience": "ExempleAudience", 7 | "Issuer": "ExempleIssuer", 8 | "Seconds": 1200 9 | }, 10 | "Logging": { 11 | "IncludeScopes": false, 12 | "LogLevel": { 13 | "Default": "Warning" 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 17 - Enable Docker/RestWithASPNETUdemy/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "MySqlConnection": { 3 | "MySqlConnectionString": "Server=localhost;Port=3306;Database=rest_with_asp_net_udemy;Uid=root;Pwd=;SslMode=none;" 4 | }, 5 | "TokenConfigurations": { 6 | "Audience": "ExempleAudience", 7 | "Issuer": "ExempleIssuer", 8 | "Seconds": 1200 9 | }, 10 | "Logging": { 11 | "IncludeScopes": false, 12 | "LogLevel": { 13 | "Default": "Warning" 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 19 - Bash Script/RestWithASPNETUdemy/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "MySqlConnection": { 3 | "MySqlConnectionString": "Server=db;Port=3306;Database=rest_with_asp_net_udemy;Uid=root;Pwd=docker;SslMode=none;" 4 | }, 5 | "TokenConfigurations": { 6 | "Audience": "ExempleAudience", 7 | "Issuer": "ExempleIssuer", 8 | "Seconds": 1200 9 | }, 10 | "Logging": { 11 | "IncludeScopes": false, 12 | "LogLevel": { 13 | "Default": "Warning" 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 13 - Authentication/RestWithASPNETUdemy/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "MySqlConnection": { 3 | "MySqlConnectionString": "Server=localhost;Port=3306;Database=rest_with_asp_net_udemy;Uid=root;Pwd=;SslMode=none;" 4 | }, 5 | "TokenConfigurations": { 6 | "Audience": "ExempleAudience", 7 | "Issuer": "ExempleIssuer", 8 | "Seconds": 1200 9 | }, 10 | "Logging": { 11 | "IncludeScopes": false, 12 | "LogLevel": { 13 | "Default": "Warning" 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy Extra Sessions/RestWithASPNETUdemy HATEOAS Done On The Nail/RestWithASPNETUdemy/Business/IBookBusiness.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Data.VO; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IBookBusiness 7 | { 8 | BookVO Create(BookVO book); 9 | BookVO FindById(long id); 10 | List FindAll(); 11 | BookVO Update(BookVO book); 12 | void Delete(long id); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 11 - HATEOAS/RestWithASPNETUdemy/Repository/Generic/IRepository.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model.Base; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Repository.Generic 5 | { 6 | public interface IRepository where T : BaseEntity 7 | { 8 | T Create(T item); 9 | T FindById(long id); 10 | List FindAll(); 11 | T Update(T item); 12 | void Delete(long id); 13 | 14 | bool Exists(long? id); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 11 - HATEOAS/RestWithASPNETUdemy/Repository/IPersonRepository.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IPersonRepository 7 | { 8 | Person Create(Person person); 9 | Person FindById(long id); 10 | List FindAll(); 11 | Person Update(Person person); 12 | void Delete(long id); 13 | 14 | bool Exists(long? id); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 12 - Swagger/RestWithASPNETUdemy/Repository/Generic/IRepository.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model.Base; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Repository.Generic 5 | { 6 | public interface IRepository where T : BaseEntity 7 | { 8 | T Create(T item); 9 | T FindById(long id); 10 | List FindAll(); 11 | T Update(T item); 12 | void Delete(long id); 13 | 14 | bool Exists(long? id); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 12 - Swagger/RestWithASPNETUdemy/Repository/IPersonRepository.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IPersonRepository 7 | { 8 | Person Create(Person person); 9 | Person FindById(long id); 10 | List FindAll(); 11 | Person Update(Person person); 12 | void Delete(long id); 13 | 14 | bool Exists(long? id); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 18 - Starting With Dump File/RestWithASPNETUdemy/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "MySqlConnection": { 3 | "MySqlConnectionString": "Server=db;Port=3306;Database=rest_with_asp_net_udemy;Uid=root;Pwd=docker;SslMode=none;" 4 | }, 5 | "TokenConfigurations": { 6 | "Audience": "ExempleAudience", 7 | "Issuer": "ExempleIssuer", 8 | "Seconds": 1200 9 | }, 10 | "Logging": { 11 | "IncludeScopes": false, 12 | "LogLevel": { 13 | "Default": "Warning" 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 19 - Bash Script/RestWithASPNETUdemy/Model/Book.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model.Base; 2 | using System; 3 | using System.ComponentModel.DataAnnotations.Schema; 4 | 5 | namespace RestWithASPNETUdemy.Model 6 | { 7 | [Table("books")] 8 | public class Book : BaseEntity 9 | { 10 | public string Title { get; set; } 11 | public string Author { get; set; } 12 | public decimal Price { get; set; } 13 | public DateTime LaunchDate { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /RestWithASPNETUdemy 20 - Final Release/RestWithASPNETUdemy/Model/Book.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model.Base; 2 | using System; 3 | using System.ComponentModel.DataAnnotations.Schema; 4 | 5 | namespace RestWithASPNETUdemy.Model 6 | { 7 | [Table("books")] 8 | public class Book : BaseEntity 9 | { 10 | public string Title { get; set; } 11 | public string Author { get; set; } 12 | public decimal Price { get; set; } 13 | public DateTime LaunchDate { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /RestWithASPNETUdemy Extra Sessions/RestWithASPNETUdemy Authentication Get User Principal/RestWithASPNETUdemy/Business/IBookBusiness.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Data.VO; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IBookBusiness 7 | { 8 | BookVO Create(BookVO book); 9 | BookVO FindById(long id); 10 | List FindAll(); 11 | BookVO Update(BookVO book); 12 | void Delete(long id); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 05 - Spliting Logic/RestWithASPNETUdemy/Repository/IPersonRepository.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IPersonRepository 7 | { 8 | Person Create(Person person); 9 | Person FindById(long id); 10 | List FindAll(); 11 | Person Update(Person person); 12 | void Delete(long id); 13 | 14 | bool Exists(long? id); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 09 - Data Contract/RestWithASPNETUdemy/Repository/Generic/IRepository.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model.Base; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Repository.Generic 5 | { 6 | public interface IRepository where T : BaseEntity 7 | { 8 | T Create(T item); 9 | T FindById(long id); 10 | List FindAll(); 11 | T Update(T item); 12 | void Delete(long id); 13 | 14 | bool Exists(long? id); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 09 - Data Contract/RestWithASPNETUdemy/Repository/IPersonRepository.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IPersonRepository 7 | { 8 | Person Create(Person person); 9 | Person FindById(long id); 10 | List FindAll(); 11 | Person Update(Person person); 12 | void Delete(long id); 13 | 14 | bool Exists(long? id); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 14 - PATH Verb And Query Param/RestWithASPNETUdemy/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "MySqlConnection": { 3 | "MySqlConnectionString": "Server=localhost;Port=3306;Database=rest_with_asp_net_udemy;Uid=root;Pwd=;SslMode=none;" 4 | }, 5 | "TokenConfigurations": { 6 | "Audience": "ExempleAudience", 7 | "Issuer": "ExempleIssuer", 8 | "Seconds": 1200 9 | }, 10 | "Logging": { 11 | "IncludeScopes": false, 12 | "LogLevel": { 13 | "Default": "Warning" 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 10 - Content Negotiation/RestWithASPNETUdemy/Repository/IPersonRepository.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IPersonRepository 7 | { 8 | Person Create(Person person); 9 | Person FindById(long id); 10 | List FindAll(); 11 | Person Update(Person person); 12 | void Delete(long id); 13 | 14 | bool Exists(long? id); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 13 - Authentication/RestWithASPNETUdemy/Repository/Generic/IRepository.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model.Base; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Repository.Generic 5 | { 6 | public interface IRepository where T : BaseEntity 7 | { 8 | T Create(T item); 9 | T FindById(long id); 10 | List FindAll(); 11 | T Update(T item); 12 | void Delete(long id); 13 | 14 | bool Exists(long? id); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy Extra Sessions/RestWithASPNETUdemy HATEOAS Done On The Nail/Hypermedia/Abstract/ISupportsHyperMedia.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace Hypermedia.Abstract 4 | { 5 | /// 6 | /// Interface for models that support Hypermedia 7 | /// 8 | public interface ISupportsHyperMedia 9 | { 10 | /// 11 | /// A collection of hepermedia links 12 | /// 13 | List Links { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /RestWithASPNETUdemy 05 - Spliting Logic/RestWithASPNETUdemy/Model/Person.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace RestWithASPNETUdemy.Model 7 | { 8 | public class Person 9 | { 10 | public long? Id { get; set; } 11 | public string FirstName { get; set; } 12 | public string LastName { get; set; } 13 | public string Address { get; set; } 14 | public string Gender { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 10 - Content Negotiation/RestWithASPNETUdemy/Repository/Generic/IRepository.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model.Base; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Repository.Generic 5 | { 6 | public interface IRepository where T : BaseEntity 7 | { 8 | T Create(T item); 9 | T FindById(long id); 10 | List FindAll(); 11 | T Update(T item); 12 | void Delete(long id); 13 | 14 | bool Exists(long? id); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy Extra Sessions/RestWithASPNETUdemy HATEOAS Done On The Nail/RestWithASPNETUdemy/Business/IPersonBusiness.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Data.VO; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IPersonBusiness 7 | { 8 | PersonVO Create(PersonVO person); 9 | PersonVO FindById(long id); 10 | List FindAll(); 11 | PersonVO Update(PersonVO person); 12 | void Delete(long id); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 02 - Using Diferent Verbs/RestWithASPNETUdemy/Model/Person.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace RestWithASPNETUdemy.Model 7 | { 8 | public class Person 9 | { 10 | public long Id { get; set; } 11 | public string FirstName { get; set; } 12 | public string LastName { get; set; } 13 | public string Address { get; set; } 14 | public string Gender { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 04 - Versioning Endpoints/RestWithASPNETUdemy/Model/Person.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace RestWithASPNETUdemy.Model 7 | { 8 | public class Person 9 | { 10 | public long? Id { get; set; } 11 | public string FirstName { get; set; } 12 | public string LastName { get; set; } 13 | public string Address { get; set; } 14 | public string Gender { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 08 - Working With Value Objects/RestWithASPNETUdemy/Repository/Generic/IRepository.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model.Base; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Repository.Generic 5 | { 6 | public interface IRepository where T : BaseEntity 7 | { 8 | T Create(T item); 9 | T FindById(long id); 10 | List FindAll(); 11 | T Update(T item); 12 | void Delete(long id); 13 | 14 | bool Exists(long? id); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 08 - Working With Value Objects/RestWithASPNETUdemy/Repository/IPersonRepository.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IPersonRepository 7 | { 8 | Person Create(Person person); 9 | Person FindById(long id); 10 | List FindAll(); 11 | Person Update(Person person); 12 | void Delete(long id); 13 | 14 | bool Exists(long? id); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 14 - PATH Verb And Query Param/RestWithASPNETUdemy/Repository/Generic/IRepository.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model.Base; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Repository.Generic 5 | { 6 | public interface IRepository where T : BaseEntity 7 | { 8 | T Create(T item); 9 | T FindById(long id); 10 | List FindAll(); 11 | T Update(T item); 12 | void Delete(long id); 13 | 14 | bool Exists(long? id); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy Extra Sessions/RestWithASPNETUdemy Authentication Get User Principal/RestWithASPNETUdemy/Business/IPersonBusiness.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Data.VO; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IPersonBusiness 7 | { 8 | PersonVO Create(PersonVO person); 9 | PersonVO FindById(long id); 10 | List FindAll(); 11 | PersonVO Update(PersonVO person); 12 | void Delete(long id); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 03 - Connecting To Database/RestWithASPNETUdemy/Model/Person.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace RestWithASPNETUdemy.Model 7 | { 8 | public class Person 9 | { 10 | public long? Id { get; set; } 11 | public string FirstName { get; set; } 12 | public string LastName { get; set; } 13 | public string Address { get; set; } 14 | public string Gender { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 07 - Working With Generic Repository/RestWithASPNETUdemy/Repository/Generic/IRepository.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model.Base; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Repository.Generic 5 | { 6 | public interface IRepository where T : BaseEntity 7 | { 8 | T Create(T item); 9 | T FindById(long id); 10 | List FindAll(); 11 | T Update(T item); 12 | void Delete(long id); 13 | 14 | bool Exists(long? id); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 07 - Working With Generic Repository/RestWithASPNETUdemy/Repository/IPersonRepository.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IPersonRepository 7 | { 8 | Person Create(Person person); 9 | Person FindById(long id); 10 | List FindAll(); 11 | Person Update(Person person); 12 | void Delete(long id); 13 | 14 | bool Exists(long? id); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 06 - Adding Support To Database Migrations/RestWithASPNETUdemy/Repository/IPersonRepository.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IPersonRepository 7 | { 8 | Person Create(Person person); 9 | Person FindById(long id); 10 | List FindAll(); 11 | Person Update(Person person); 12 | void Delete(long id); 13 | 14 | bool Exists(long? id); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy Extra Sessions/RestWithASPNETUdemy HATEOAS Done On The Nail/Hypermedia/Abstract/IResponseEnricher.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc.Filters; 2 | using System.Threading.Tasks; 3 | 4 | namespace Hypermedia.Abstract 5 | { 6 | /// 7 | /// Interface for any class that wants to enrich a response 8 | /// 9 | public interface IResponseEnricher 10 | { 11 | 12 | bool CanEnrich(ResultExecutingContext context); 13 | 14 | Task Enrich(ResultExecutingContext context); 15 | } 16 | } -------------------------------------------------------------------------------- /RestWithASPNETUdemy 21 - Connecting To Other Databases/DataAccessSqliteProvider/Context/SqliteSQLContext.cs: -------------------------------------------------------------------------------- 1 | using DomainModel.Model; 2 | using Microsoft.EntityFrameworkCore; 3 | 4 | namespace DataAccessSqliteProvider.Context 5 | { 6 | public class SqliteSQLContext : DbContext 7 | { 8 | public SqliteSQLContext() 9 | { 10 | 11 | } 12 | 13 | public SqliteSQLContext(DbContextOptions options) : base(options) {} 14 | 15 | public DbSet Persons { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 21 - Connecting To Other Databases/DomainModel/DomainModel.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.0 5 | DomainModel 6 | DomainModel 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 11 - HATEOAS/RestWithASPNETUdemy/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore; 2 | using Microsoft.AspNetCore.Hosting; 3 | 4 | namespace RestWithASPNETUdemy 5 | { 6 | public class Program 7 | { 8 | public static void Main(string[] args) 9 | { 10 | BuildWebHost(args).Run(); 11 | } 12 | 13 | public static IWebHost BuildWebHost(string[] args) => 14 | WebHost.CreateDefaultBuilder(args) 15 | .UseStartup() 16 | .Build(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 12 - Swagger/RestWithASPNETUdemy/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore; 2 | using Microsoft.AspNetCore.Hosting; 3 | 4 | namespace RestWithASPNETUdemy 5 | { 6 | public class Program 7 | { 8 | public static void Main(string[] args) 9 | { 10 | BuildWebHost(args).Run(); 11 | } 12 | 13 | public static IWebHost BuildWebHost(string[] args) => 14 | WebHost.CreateDefaultBuilder(args) 15 | .UseStartup() 16 | .Build(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy Extra Sessions/RestWithASPNETUdemy Authentication Get User Principal/RestWithASPNETUdemy/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "MySqlConnection": { 3 | "MySqlConnectionString": "Server=localhost;Port=3306;Database=rest_with_asp_net_udemy;Uid=root;Pwd=;SslMode=none;" 4 | }, 5 | "TokenConfigurations": { 6 | "Audience": "ExempleAudience", 7 | "Issuer": "ExempleIssuer", 8 | "Seconds": 1200 9 | }, 10 | "Logging": { 11 | "IncludeScopes": false, 12 | "LogLevel": { 13 | "Default": "Warning" 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 05 - Spliting Logic/RestWithASPNETUdemy/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore; 2 | using Microsoft.AspNetCore.Hosting; 3 | 4 | namespace RestWithASPNETUdemy 5 | { 6 | public class Program 7 | { 8 | public static void Main(string[] args) 9 | { 10 | BuildWebHost(args).Run(); 11 | } 12 | 13 | public static IWebHost BuildWebHost(string[] args) => 14 | WebHost.CreateDefaultBuilder(args) 15 | .UseStartup() 16 | .Build(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 09 - Data Contract/RestWithASPNETUdemy/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore; 2 | using Microsoft.AspNetCore.Hosting; 3 | 4 | namespace RestWithASPNETUdemy 5 | { 6 | public class Program 7 | { 8 | public static void Main(string[] args) 9 | { 10 | BuildWebHost(args).Run(); 11 | } 12 | 13 | public static IWebHost BuildWebHost(string[] args) => 14 | WebHost.CreateDefaultBuilder(args) 15 | .UseStartup() 16 | .Build(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 13 - Authentication/RestWithASPNETUdemy/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore; 2 | using Microsoft.AspNetCore.Hosting; 3 | 4 | namespace RestWithASPNETUdemy 5 | { 6 | public class Program 7 | { 8 | public static void Main(string[] args) 9 | { 10 | BuildWebHost(args).Run(); 11 | } 12 | 13 | public static IWebHost BuildWebHost(string[] args) => 14 | WebHost.CreateDefaultBuilder(args) 15 | .UseStartup() 16 | .Build(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 15 - PagedSearch/RestWithASPNETUdemy/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore; 2 | using Microsoft.AspNetCore.Hosting; 3 | 4 | namespace RestWithASPNETUdemy 5 | { 6 | public class Program 7 | { 8 | public static void Main(string[] args) 9 | { 10 | BuildWebHost(args).Run(); 11 | } 12 | 13 | public static IWebHost BuildWebHost(string[] args) => 14 | WebHost.CreateDefaultBuilder(args) 15 | .UseStartup() 16 | .Build(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 16 - Binary Files/RestWithASPNETUdemy/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore; 2 | using Microsoft.AspNetCore.Hosting; 3 | 4 | namespace RestWithASPNETUdemy 5 | { 6 | public class Program 7 | { 8 | public static void Main(string[] args) 9 | { 10 | BuildWebHost(args).Run(); 11 | } 12 | 13 | public static IWebHost BuildWebHost(string[] args) => 14 | WebHost.CreateDefaultBuilder(args) 15 | .UseStartup() 16 | .Build(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 17 - Enable Docker/RestWithASPNETUdemy/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore; 2 | using Microsoft.AspNetCore.Hosting; 3 | 4 | namespace RestWithASPNETUdemy 5 | { 6 | public class Program 7 | { 8 | public static void Main(string[] args) 9 | { 10 | BuildWebHost(args).Run(); 11 | } 12 | 13 | public static IWebHost BuildWebHost(string[] args) => 14 | WebHost.CreateDefaultBuilder(args) 15 | .UseStartup() 16 | .Build(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 19 - Bash Script/RestWithASPNETUdemy/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore; 2 | using Microsoft.AspNetCore.Hosting; 3 | 4 | namespace RestWithASPNETUdemy 5 | { 6 | public class Program 7 | { 8 | public static void Main(string[] args) 9 | { 10 | BuildWebHost(args).Run(); 11 | } 12 | 13 | public static IWebHost BuildWebHost(string[] args) => 14 | WebHost.CreateDefaultBuilder(args) 15 | .UseStartup() 16 | .Build(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 20 - Final Release/RestWithASPNETUdemy/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore; 2 | using Microsoft.AspNetCore.Hosting; 3 | 4 | namespace RestWithASPNETUdemy 5 | { 6 | public class Program 7 | { 8 | public static void Main(string[] args) 9 | { 10 | BuildWebHost(args).Run(); 11 | } 12 | 13 | public static IWebHost BuildWebHost(string[] args) => 14 | WebHost.CreateDefaultBuilder(args) 15 | .UseStartup() 16 | .Build(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy Extra Sessions/RestWithASPNETUdemy HATEOAS Done On The Nail/RestWithASPNETUdemy/Repository/IPersonRepository.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IPersonRepository 7 | { 8 | Person Create(Person person); 9 | Person FindById(long id); 10 | List FindAll(); 11 | Person Update(Person person); 12 | void Delete(long id); 13 | 14 | bool Exists(long? id); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 04 - Versioning Endpoints/RestWithASPNETUdemy/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore; 2 | using Microsoft.AspNetCore.Hosting; 3 | 4 | namespace RestWithASPNETUdemy 5 | { 6 | public class Program 7 | { 8 | public static void Main(string[] args) 9 | { 10 | BuildWebHost(args).Run(); 11 | } 12 | 13 | public static IWebHost BuildWebHost(string[] args) => 14 | WebHost.CreateDefaultBuilder(args) 15 | .UseStartup() 16 | .Build(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 10 - Content Negotiation/RestWithASPNETUdemy/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore; 2 | using Microsoft.AspNetCore.Hosting; 3 | 4 | namespace RestWithASPNETUdemy 5 | { 6 | public class Program 7 | { 8 | public static void Main(string[] args) 9 | { 10 | BuildWebHost(args).Run(); 11 | } 12 | 13 | public static IWebHost BuildWebHost(string[] args) => 14 | WebHost.CreateDefaultBuilder(args) 15 | .UseStartup() 16 | .Build(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 21 - Connecting To Other Databases/DataAccessPostgreSqlProvider/Context/PostgreeSQLContext.cs: -------------------------------------------------------------------------------- 1 | using DomainModel.Model; 2 | using Microsoft.EntityFrameworkCore; 3 | 4 | namespace DataAccessPostgreeSQLProvider.Context 5 | { 6 | public class PostgreeSQLContext : DbContext 7 | { 8 | public PostgreeSQLContext() 9 | { 10 | 11 | } 12 | 13 | public PostgreeSQLContext(DbContextOptions options) : base(options) {} 14 | 15 | public DbSet Persons { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy Extra Sessions/RestWithASPNETUdemy HATEOAS Done On The Nail/RestWithASPNETUdemy/Repository/Generic/IRepository.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model.Base; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Repository.Generic 5 | { 6 | public interface IRepository where T : BaseEntity 7 | { 8 | T Create(T item); 9 | T FindById(long id); 10 | List FindAll(); 11 | T Update(T item); 12 | void Delete(long id); 13 | 14 | bool Exists(long? id); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 03 - Connecting To Database/RestWithASPNETUdemy/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore; 2 | using Microsoft.AspNetCore.Hosting; 3 | 4 | namespace RestWithASPNETUdemy 5 | { 6 | public class Program 7 | { 8 | public static void Main(string[] args) 9 | { 10 | BuildWebHost(args).Run(); 11 | } 12 | 13 | public static IWebHost BuildWebHost(string[] args) => 14 | WebHost.CreateDefaultBuilder(args) 15 | .UseStartup() 16 | .Build(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 14 - PATH Verb And Query Param/RestWithASPNETUdemy/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore; 2 | using Microsoft.AspNetCore.Hosting; 3 | 4 | namespace RestWithASPNETUdemy 5 | { 6 | public class Program 7 | { 8 | public static void Main(string[] args) 9 | { 10 | BuildWebHost(args).Run(); 11 | } 12 | 13 | public static IWebHost BuildWebHost(string[] args) => 14 | WebHost.CreateDefaultBuilder(args) 15 | .UseStartup() 16 | .Build(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 16 - Binary Files/RestWithASPNETUdemy/Business/Implementattions/FileBusinessImpl.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | using System.IO; 3 | 4 | namespace RestWithASPNETUdemy.Business.Implementattions 5 | { 6 | public class FileBusinessImpl : IFileBusiness 7 | { 8 | public byte[] GetPDFFile() 9 | { 10 | string path = Directory.GetCurrentDirectory(); 11 | var fulPath = path + "\\Other\\aspnet-life-cycles-events.pdf"; 12 | return File.ReadAllBytes(fulPath); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 18 - Starting With Dump File/RestWithASPNETUdemy/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore; 2 | using Microsoft.AspNetCore.Hosting; 3 | 4 | namespace RestWithASPNETUdemy 5 | { 6 | public class Program 7 | { 8 | public static void Main(string[] args) 9 | { 10 | BuildWebHost(args).Run(); 11 | } 12 | 13 | public static IWebHost BuildWebHost(string[] args) => 14 | WebHost.CreateDefaultBuilder(args) 15 | .UseStartup() 16 | .Build(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 19 - Bash Script/RestWithASPNETUdemy/Business/Implementattions/FileBusinessImpl.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | using System.IO; 3 | 4 | namespace RestWithASPNETUdemy.Business.Implementattions 5 | { 6 | public class FileBusinessImpl : IFileBusiness 7 | { 8 | public byte[] GetPDFFile() 9 | { 10 | string path = Directory.GetCurrentDirectory(); 11 | var fulPath = path + "\\Other\\aspnet-life-cycles-events.pdf"; 12 | return File.ReadAllBytes(fulPath); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy Extra Sessions/RestWithASPNETUdemy Authentication Get User Principal/RestWithASPNETUdemy/Repository/Generic/IRepository.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model.Base; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Repository.Generic 5 | { 6 | public interface IRepository where T : BaseEntity 7 | { 8 | T Create(T item); 9 | T FindById(long id); 10 | List FindAll(); 11 | T Update(T item); 12 | void Delete(long id); 13 | 14 | bool Exists(long? id); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 08 - Working With Value Objects/RestWithASPNETUdemy/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore; 2 | using Microsoft.AspNetCore.Hosting; 3 | 4 | namespace RestWithASPNETUdemy 5 | { 6 | public class Program 7 | { 8 | public static void Main(string[] args) 9 | { 10 | BuildWebHost(args).Run(); 11 | } 12 | 13 | public static IWebHost BuildWebHost(string[] args) => 14 | WebHost.CreateDefaultBuilder(args) 15 | .UseStartup() 16 | .Build(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 14 - PATH Verb And Query Param/RestWithASPNETUdemy/Business/IPersonBusiness.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Data.VO; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Business 5 | { 6 | public interface IPersonBusiness 7 | { 8 | PersonVO Create(PersonVO person); 9 | PersonVO FindById(long id); 10 | List FindAll(); 11 | List FindByName(string fristName, string lastName); 12 | PersonVO Update(PersonVO person); 13 | void Delete(long id); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 17 - Enable Docker/RestWithASPNETUdemy/Business/Implementattions/FileBusinessImpl.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | using System.IO; 3 | 4 | namespace RestWithASPNETUdemy.Business.Implementattions 5 | { 6 | public class FileBusinessImpl : IFileBusiness 7 | { 8 | public byte[] GetPDFFile() 9 | { 10 | string path = Directory.GetCurrentDirectory(); 11 | var fulPath = path + "\\Other\\aspnet-life-cycles-events.pdf"; 12 | return File.ReadAllBytes(fulPath); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 20 - Final Release/RestWithASPNETUdemy/Business/Implementattions/FileBusinessImpl.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | using System.IO; 3 | 4 | namespace RestWithASPNETUdemy.Business.Implementattions 5 | { 6 | public class FileBusinessImpl : IFileBusiness 7 | { 8 | public byte[] GetPDFFile() 9 | { 10 | string path = Directory.GetCurrentDirectory(); 11 | var fulPath = path + "\\Other\\aspnet-life-cycles-events.pdf"; 12 | return File.ReadAllBytes(fulPath); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 21 - Connecting To Other Databases/RestWithASPNETUdemy/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore; 2 | using Microsoft.AspNetCore.Hosting; 3 | 4 | namespace RestWithASPNETUdemy 5 | { 6 | public class Program 7 | { 8 | public static void Main(string[] args) 9 | { 10 | BuildWebHost(args).Run(); 11 | } 12 | 13 | public static IWebHost BuildWebHost(string[] args) => 14 | WebHost.CreateDefaultBuilder(args) 15 | .UseStartup() 16 | .Build(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 07 - Working With Generic Repository/RestWithASPNETUdemy/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore; 2 | using Microsoft.AspNetCore.Hosting; 3 | 4 | namespace RestWithASPNETUdemy 5 | { 6 | public class Program 7 | { 8 | public static void Main(string[] args) 9 | { 10 | BuildWebHost(args).Run(); 11 | } 12 | 13 | public static IWebHost BuildWebHost(string[] args) => 14 | WebHost.CreateDefaultBuilder(args) 15 | .UseStartup() 16 | .Build(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 06 - Adding Support To Database Migrations/RestWithASPNETUdemy/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore; 2 | using Microsoft.AspNetCore.Hosting; 3 | 4 | namespace RestWithASPNETUdemy 5 | { 6 | public class Program 7 | { 8 | public static void Main(string[] args) 9 | { 10 | BuildWebHost(args).Run(); 11 | } 12 | 13 | public static IWebHost BuildWebHost(string[] args) => 14 | WebHost.CreateDefaultBuilder(args) 15 | .UseStartup() 16 | .Build(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 15 - PagedSearch/RestWithASPNETUdemy/Model/Context/MySQLContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace RestWithASPNETUdemy.Model.Context 4 | { 5 | public class MySQLContext : DbContext 6 | { 7 | public MySQLContext() 8 | { 9 | 10 | } 11 | 12 | public MySQLContext(DbContextOptions options) : base(options) {} 13 | 14 | public DbSet Persons { get; set; } 15 | public DbSet Books { get; set; } 16 | public DbSet Users { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 16 - Binary Files/RestWithASPNETUdemy/Model/Context/MySQLContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace RestWithASPNETUdemy.Model.Context 4 | { 5 | public class MySQLContext : DbContext 6 | { 7 | public MySQLContext() 8 | { 9 | 10 | } 11 | 12 | public MySQLContext(DbContextOptions options) : base(options) {} 13 | 14 | public DbSet Persons { get; set; } 15 | public DbSet Books { get; set; } 16 | public DbSet Users { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 18 - Starting With Dump File/RestWithASPNETUdemy/Business/Implementattions/FileBusinessImpl.cs: -------------------------------------------------------------------------------- 1 | using RestWithASPNETUdemy.Model; 2 | using System.IO; 3 | 4 | namespace RestWithASPNETUdemy.Business.Implementattions 5 | { 6 | public class FileBusinessImpl : IFileBusiness 7 | { 8 | public byte[] GetPDFFile() 9 | { 10 | string path = Directory.GetCurrentDirectory(); 11 | var fulPath = path + "\\Other\\aspnet-life-cycles-events.pdf"; 12 | return File.ReadAllBytes(fulPath); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 19 - Bash Script/RestWithASPNETUdemy/Model/Context/MySQLContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace RestWithASPNETUdemy.Model.Context 4 | { 5 | public class MySQLContext : DbContext 6 | { 7 | public MySQLContext() 8 | { 9 | 10 | } 11 | 12 | public MySQLContext(DbContextOptions options) : base(options) {} 13 | 14 | public DbSet Persons { get; set; } 15 | public DbSet Books { get; set; } 16 | public DbSet Users { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 13 - Authentication/RestWithASPNETUdemy/Model/Context/MySQLContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace RestWithASPNETUdemy.Model.Context 4 | { 5 | public class MySQLContext : DbContext 6 | { 7 | public MySQLContext() 8 | { 9 | 10 | } 11 | 12 | public MySQLContext(DbContextOptions options) : base(options) {} 13 | 14 | public DbSet Persons { get; set; } 15 | public DbSet Books { get; set; } 16 | public DbSet Users { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 17 - Enable Docker/RestWithASPNETUdemy/Model/Context/MySQLContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace RestWithASPNETUdemy.Model.Context 4 | { 5 | public class MySQLContext : DbContext 6 | { 7 | public MySQLContext() 8 | { 9 | 10 | } 11 | 12 | public MySQLContext(DbContextOptions options) : base(options) {} 13 | 14 | public DbSet Persons { get; set; } 15 | public DbSet Books { get; set; } 16 | public DbSet Users { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 20 - Final Release/RestWithASPNETUdemy/Model/Context/MySQLContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace RestWithASPNETUdemy.Model.Context 4 | { 5 | public class MySQLContext : DbContext 6 | { 7 | public MySQLContext() 8 | { 9 | 10 | } 11 | 12 | public MySQLContext(DbContextOptions options) : base(options) {} 13 | 14 | public DbSet Persons { get; set; } 15 | public DbSet Books { get; set; } 16 | public DbSet Users { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 20 - Final Release/RestWithASPNETUdemy/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "MySqlConnection": { 3 | "MySqlConnectionString": "Server=hello-rest-mysqldbserver.mysql.database.azure.com;Port=3306;Database=rest_with_asp_net_udemy;Uid=mysqldbuser@hello-rest-mysqldbserver;Pwd=Admin123!;SslMode=none;" 4 | }, 5 | "TokenConfigurations": { 6 | "Audience": "ExempleAudience", 7 | "Issuer": "ExempleIssuer", 8 | "Seconds": 1200 9 | }, 10 | "Logging": { 11 | "IncludeScopes": false, 12 | "LogLevel": { 13 | "Default": "Warning" 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 05 - Spliting Logic/RestWithASPNETUdemy/Model/Context/MySQLContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | 7 | namespace RestWithASPNETUdemy.Model.Context 8 | { 9 | public class MySQLContext : DbContext 10 | { 11 | public MySQLContext() 12 | { 13 | 14 | } 15 | 16 | public MySQLContext(DbContextOptions options) : base(options) {} 17 | 18 | public DbSet Persons { get; set; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 11 - HATEOAS/RestWithASPNETUdemy/Data/VO/PersonVO.cs: -------------------------------------------------------------------------------- 1 | using Tapioca.HATEOAS; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Data.VO 5 | { 6 | public class PersonVO : ISupportsHyperMedia 7 | { 8 | public long? Id { get; set; } 9 | public string FirstName { get; set; } 10 | public string LastName { get; set; } 11 | public string Address { get; set; } 12 | public string Gender { get; set; } 13 | 14 | public List Links { get; set; } = new List(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 12 - Swagger/RestWithASPNETUdemy/Data/VO/PersonVO.cs: -------------------------------------------------------------------------------- 1 | using Tapioca.HATEOAS; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Data.VO 5 | { 6 | public class PersonVO : ISupportsHyperMedia 7 | { 8 | public long? Id { get; set; } 9 | public string FirstName { get; set; } 10 | public string LastName { get; set; } 11 | public string Address { get; set; } 12 | public string Gender { get; set; } 13 | 14 | public List Links { get; set; } = new List(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 14 - PATH Verb And Query Param/RestWithASPNETUdemy/Model/Context/MySQLContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace RestWithASPNETUdemy.Model.Context 4 | { 5 | public class MySQLContext : DbContext 6 | { 7 | public MySQLContext() 8 | { 9 | 10 | } 11 | 12 | public MySQLContext(DbContextOptions options) : base(options) {} 13 | 14 | public DbSet Persons { get; set; } 15 | public DbSet Books { get; set; } 16 | public DbSet Users { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 18 - Starting With Dump File/RestWithASPNETUdemy/Model/Context/MySQLContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | 3 | namespace RestWithASPNETUdemy.Model.Context 4 | { 5 | public class MySQLContext : DbContext 6 | { 7 | public MySQLContext() 8 | { 9 | 10 | } 11 | 12 | public MySQLContext(DbContextOptions options) : base(options) {} 13 | 14 | public DbSet Persons { get; set; } 15 | public DbSet Books { get; set; } 16 | public DbSet Users { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy Extra Sessions/RestWithASPNETUdemy HATEOAS Done On The Nail/RestWithASPNETUdemy/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore; 2 | using Microsoft.AspNetCore.Hosting; 3 | 4 | namespace RestWithASPNETUdemy 5 | { 6 | public class Program 7 | { 8 | public static void Main(string[] args) 9 | { 10 | BuildWebHost(args).Run(); 11 | } 12 | 13 | public static IWebHost BuildWebHost(string[] args) => 14 | WebHost.CreateDefaultBuilder(args) 15 | .UseStartup() 16 | .Build(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 13 - Authentication/RestWithASPNETUdemy/Data/VO/PersonVO.cs: -------------------------------------------------------------------------------- 1 | using Tapioca.HATEOAS; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Data.VO 5 | { 6 | public class PersonVO : ISupportsHyperMedia 7 | { 8 | public long? Id { get; set; } 9 | public string FirstName { get; set; } 10 | public string LastName { get; set; } 11 | public string Address { get; set; } 12 | public string Gender { get; set; } 13 | 14 | public List Links { get; set; } = new List(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 15 - PagedSearch/RestWithASPNETUdemy/Data/VO/PersonVO.cs: -------------------------------------------------------------------------------- 1 | using Tapioca.HATEOAS; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Data.VO 5 | { 6 | public class PersonVO : ISupportsHyperMedia 7 | { 8 | public long? Id { get; set; } 9 | public string FirstName { get; set; } 10 | public string LastName { get; set; } 11 | public string Address { get; set; } 12 | public string Gender { get; set; } 13 | 14 | public List Links { get; set; } = new List(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 16 - Binary Files/RestWithASPNETUdemy/Data/VO/PersonVO.cs: -------------------------------------------------------------------------------- 1 | using Tapioca.HATEOAS; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Data.VO 5 | { 6 | public class PersonVO : ISupportsHyperMedia 7 | { 8 | public long? Id { get; set; } 9 | public string FirstName { get; set; } 10 | public string LastName { get; set; } 11 | public string Address { get; set; } 12 | public string Gender { get; set; } 13 | 14 | public List Links { get; set; } = new List(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 17 - Enable Docker/RestWithASPNETUdemy/Data/VO/PersonVO.cs: -------------------------------------------------------------------------------- 1 | using Tapioca.HATEOAS; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Data.VO 5 | { 6 | public class PersonVO : ISupportsHyperMedia 7 | { 8 | public long? Id { get; set; } 9 | public string FirstName { get; set; } 10 | public string LastName { get; set; } 11 | public string Address { get; set; } 12 | public string Gender { get; set; } 13 | 14 | public List Links { get; set; } = new List(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 19 - Bash Script/RestWithASPNETUdemy/Data/VO/PersonVO.cs: -------------------------------------------------------------------------------- 1 | using Tapioca.HATEOAS; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Data.VO 5 | { 6 | public class PersonVO : ISupportsHyperMedia 7 | { 8 | public long? Id { get; set; } 9 | public string FirstName { get; set; } 10 | public string LastName { get; set; } 11 | public string Address { get; set; } 12 | public string Gender { get; set; } 13 | 14 | public List Links { get; set; } = new List(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 20 - Final Release/RestWithASPNETUdemy/Data/VO/PersonVO.cs: -------------------------------------------------------------------------------- 1 | using Tapioca.HATEOAS; 2 | using System.Collections.Generic; 3 | 4 | namespace RestWithASPNETUdemy.Data.VO 5 | { 6 | public class PersonVO : ISupportsHyperMedia 7 | { 8 | public long? Id { get; set; } 9 | public string FirstName { get; set; } 10 | public string LastName { get; set; } 11 | public string Address { get; set; } 12 | public string Gender { get; set; } 13 | 14 | public List Links { get; set; } = new List(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 03 - Connecting To Database/RestWithASPNETUdemy/Model/Context/MySQLContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | 7 | namespace RestWithASPNETUdemy.Model.Context 8 | { 9 | public class MySQLContext : DbContext 10 | { 11 | public MySQLContext() 12 | { 13 | 14 | } 15 | 16 | public MySQLContext(DbContextOptions options) : base(options) {} 17 | 18 | public DbSet Persons { get; set; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 04 - Versioning Endpoints/RestWithASPNETUdemy/Model/Context/MySQLContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | 7 | namespace RestWithASPNETUdemy.Model.Context 8 | { 9 | public class MySQLContext : DbContext 10 | { 11 | public MySQLContext() 12 | { 13 | 14 | } 15 | 16 | public MySQLContext(DbContextOptions options) : base(options) {} 17 | 18 | public DbSet Persons { get; set; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /RestWithASPNETUdemy 11 - HATEOAS/RestWithASPNETUdemy/Data/VO/BookVO.cs: -------------------------------------------------------------------------------- 1 | using Tapioca.HATEOAS; 2 | using System; 3 | using System.Collections.Generic; 4 | 5 | namespace RestWithASPNETUdemy.Data.VO 6 | { 7 | public class BookVO : ISupportsHyperMedia 8 | { 9 | public long? Id { get; set; } 10 | public string Title { get; set; } 11 | public string Author { get; set; } 12 | public decimal Price { get; set; } 13 | public DateTime LaunchDate { get; set; } 14 | 15 | public List Links { get; set; } = new List(); 16 | } 17 | } -------------------------------------------------------------------------------- /RestWithASPNETUdemy 12 - Swagger/RestWithASPNETUdemy/Data/VO/BookVO.cs: -------------------------------------------------------------------------------- 1 | using Tapioca.HATEOAS; 2 | using System; 3 | using System.Collections.Generic; 4 | 5 | namespace RestWithASPNETUdemy.Data.VO 6 | { 7 | public class BookVO : ISupportsHyperMedia 8 | { 9 | public long? Id { get; set; } 10 | public string Title { get; set; } 11 | public string Author { get; set; } 12 | public decimal Price { get; set; } 13 | public DateTime LaunchDate { get; set; } 14 | 15 | public List Links { get; set; } = new List(); 16 | } 17 | } -------------------------------------------------------------------------------- /RestWithASPNETUdemy 15 - PagedSearch/RestWithASPNETUdemy/Data/VO/BookVO.cs: -------------------------------------------------------------------------------- 1 | using Tapioca.HATEOAS; 2 | using System; 3 | using System.Collections.Generic; 4 | 5 | namespace RestWithASPNETUdemy.Data.VO 6 | { 7 | public class BookVO : ISupportsHyperMedia 8 | { 9 | public long? Id { get; set; } 10 | public string Title { get; set; } 11 | public string Author { get; set; } 12 | public decimal Price { get; set; } 13 | public DateTime LaunchDate { get; set; } 14 | 15 | public List Links { get; set; } = new List(); 16 | } 17 | } -------------------------------------------------------------------------------- /RestWithASPNETUdemy 19 - Bash Script/RestWithASPNETUdemy/Data/VO/BookVO.cs: -------------------------------------------------------------------------------- 1 | using Tapioca.HATEOAS; 2 | using System; 3 | using System.Collections.Generic; 4 | 5 | namespace RestWithASPNETUdemy.Data.VO 6 | { 7 | public class BookVO : ISupportsHyperMedia 8 | { 9 | public long? Id { get; set; } 10 | public string Title { get; set; } 11 | public string Author { get; set; } 12 | public decimal Price { get; set; } 13 | public DateTime LaunchDate { get; set; } 14 | 15 | public List Links { get; set; } = new List(); 16 | } 17 | } --------------------------------------------------------------------------------