

#controller
the controlling part



// GET api/values
        [HttpGet]
        public ActionResult GetValues()
        {
            var values = _context.Values.ToList();
            return Ok(values);
        }
	





#Wrote the upper in Async Task


#Db Queries
	CREATE TABLE [dbo].[Users] (

		[Id]           INT             IDENTITY (1, 1) NOT NULL,

		[PasswordHash] VARBINARY (MAX) NULL,

		[PasswordSalt] VARBINARY (MAX) NULL,

		[Username]     NVARCHAR (MAX)  NULL

	);



	CREATE TABLE [dbo].[Cities] (

		[Id]          INT            IDENTITY (1, 1) NOT NULL,

		[Description] NVARCHAR (MAX) NULL,

		[Name]        NVARCHAR (MAX) NULL,

		[UserId]      INT            NOT NULL

	);



	CREATE TABLE [dbo].[Photos] (

		[Id]          INT            IDENTITY (1, 1) NOT NULL,

		[CityId]      INT            NOT NULL,

		[DateAdded]   DATETIME2 (7)  NOT NULL,

		[Description] NVARCHAR (MAX) NULL,

		[IsMain]      BIT            NOT NULL,

		[Url]         NVARCHAR (MAX) NULL,

		[PublicId]    NVARCHAR (250) NULL

	);
	
	CREATE TABLE [dbo].[Values] (
   	 [Id]   	INT      PRIMARY KEY     NOT NULL,
    	[Name] 		NVARCHAR (50) NULL,
);

#IAppRepository All operation Signature are placed


#Api Controller names should be plural

#SehirRehber API NuGet package 7.01
	-AutoMapper install
	-AutoMapper.extension.Microsoft.DependencyInjection 5.01
	
	-Need automapper configuration in Helpers
	we add configuartion which object will map which object



#JWT Configuration JSON WEB TOKEN
Person who enter will be given a token
When he send request we will check that token for the authentication 


#Authentication Repository
#Concrete auth Repository

#For Register and Login we make Separate Dtos
Reasons:
		-Because in Login we always may want password and Username
		-in Register there might be more informations



#In startup.cs we need place a rule if program want IAuthRepository give AuthRepository


#We save Photos to the cloud 
#Using Cloudinary.com
You can Use AWS or azure too for saving files and contents.
-On Project.Api Go to NuGet Package manager and install CloudinaryDotNet version 1.31.0
-We the data : >>Cloud name, API Key, API Secret
-Save them to appSettings.JSON


#Before writing PhotosController we need prepare the Dtos
one Dto for adding photos (PhotoForCreatingDto)
other Dto for getting photos (PhotoForReturnDto)
