├── .config └── dotnet-tools.json ├── .gitattributes ├── .gitignore ├── Controllers ├── CustomerController.cs ├── DesignationController.cs ├── EmployeeController.cs ├── ProductController.cs ├── UserController.cs └── UserMasterController.cs ├── CustomerAPI.csproj ├── CustomerAPI.sln ├── Entities └── Product.cs ├── IRefreshTokenGenerator.cs ├── Models ├── APIResponse.cs ├── Category.cs ├── JWTSetting.cs ├── Learn_DBContext.cs ├── TblCustomer.cs ├── TblDesignation.cs ├── TblEmployee.cs ├── TblMenu.cs ├── TblPermission.cs ├── TblProduct.cs ├── TblRefreshtoken.cs ├── TblRole.cs ├── TblUser.cs ├── TokenResponse.cs └── usercred.cs ├── Program.cs ├── Properties └── launchSettings.json ├── RefreshTokenGenerator.cs ├── Startup.cs ├── appsettings.Development.json ├── appsettings.json └── wwwroot ├── Uploads ├── Common │ └── noimage.png └── Product │ ├── 1 │ ├── 1.png │ ├── 2.png │ ├── 3.png │ └── 4.png │ ├── 2 │ ├── 1.png │ ├── 2.png │ ├── 3.png │ └── 4.png │ ├── 5 │ ├── 1.png │ ├── 2.png │ ├── 3.png │ └── 4.png │ ├── 6 │ ├── 1.png │ ├── 2.png │ ├── 3.png │ └── 4.png │ ├── 7 │ ├── 1.png │ ├── 2.png │ ├── 3.png │ └── 4.png │ ├── 8 │ ├── 1.png │ ├── 2.png │ ├── 3.png │ └── 4.png │ ├── 9 │ ├── 1.png │ └── 2.png │ ├── 10 │ ├── 1.png │ ├── 2.png │ ├── 3.png │ └── 4.png │ ├── 11 │ ├── 1.png │ ├── 2.png │ ├── 3.png │ └── 4.png │ ├── 14 │ └── 1.png │ ├── 15 │ └── 1.png │ └── 16 │ └── 1.png └── images ├── Common └── noimage.png └── Product ├── 1 ├── 1.png ├── 2.png ├── 3.png └── 4.png ├── 2 ├── 1.png ├── 2.png ├── 3.png └── 4.png ├── 5 ├── 1.png ├── 2.png ├── 3.png └── 4.png ├── 6 ├── 1.png ├── 2.png ├── 3.png └── 4.png ├── 7 ├── 1.png ├── 2.png ├── 3.png └── 4.png ├── 8 ├── 1.png ├── 2.png ├── 3.png └── 4.png ├── 9 ├── 1.png └── 2.png ├── 10 ├── 1.png ├── 2.png ├── 3.png └── 4.png └── 11 ├── 1.png ├── 2.png ├── 3.png └── 4.png /.config/dotnet-tools.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 1, 3 | "isRoot": true, 4 | "tools": { 5 | "dotnet-ef": { 6 | "version": "6.0.1", 7 | "commands": [ 8 | "dotnet-ef" 9 | ] 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Ww][Ii][Nn]32/ 27 | [Aa][Rr][Mm]/ 28 | [Aa][Rr][Mm]64/ 29 | bld/ 30 | [Bb]in/ 31 | [Oo]bj/ 32 | [Oo]ut/ 33 | [Ll]og/ 34 | [Ll]ogs/ 35 | 36 | # Visual Studio 2015/2017 cache/options directory 37 | .vs/ 38 | # Uncomment if you have tasks that create the project's static files in wwwroot 39 | #wwwroot/ 40 | 41 | # Visual Studio 2017 auto generated files 42 | Generated\ Files/ 43 | 44 | # MSTest test Results 45 | [Tt]est[Rr]esult*/ 46 | [Bb]uild[Ll]og.* 47 | 48 | # NUnit 49 | *.VisualState.xml 50 | TestResult.xml 51 | nunit-*.xml 52 | 53 | # Build Results of an ATL Project 54 | [Dd]ebugPS/ 55 | [Rr]eleasePS/ 56 | dlldata.c 57 | 58 | # Benchmark Results 59 | BenchmarkDotNet.Artifacts/ 60 | 61 | # .NET Core 62 | project.lock.json 63 | project.fragment.lock.json 64 | artifacts/ 65 | 66 | # ASP.NET Scaffolding 67 | ScaffoldingReadMe.txt 68 | 69 | # StyleCop 70 | StyleCopReport.xml 71 | 72 | # Files built by Visual Studio 73 | *_i.c 74 | *_p.c 75 | *_h.h 76 | *.ilk 77 | *.meta 78 | *.obj 79 | *.iobj 80 | *.pch 81 | *.pdb 82 | *.ipdb 83 | *.pgc 84 | *.pgd 85 | *.rsp 86 | *.sbr 87 | *.tlb 88 | *.tli 89 | *.tlh 90 | *.tmp 91 | *.tmp_proj 92 | *_wpftmp.csproj 93 | *.log 94 | *.vspscc 95 | *.vssscc 96 | .builds 97 | *.pidb 98 | *.svclog 99 | *.scc 100 | 101 | # Chutzpah Test files 102 | _Chutzpah* 103 | 104 | # Visual C++ cache files 105 | ipch/ 106 | *.aps 107 | *.ncb 108 | *.opendb 109 | *.opensdf 110 | *.sdf 111 | *.cachefile 112 | *.VC.db 113 | *.VC.VC.opendb 114 | 115 | # Visual Studio profiler 116 | *.psess 117 | *.vsp 118 | *.vspx 119 | *.sap 120 | 121 | # Visual Studio Trace Files 122 | *.e2e 123 | 124 | # TFS 2012 Local Workspace 125 | $tf/ 126 | 127 | # Guidance Automation Toolkit 128 | *.gpState 129 | 130 | # ReSharper is a .NET coding add-in 131 | _ReSharper*/ 132 | *.[Rr]e[Ss]harper 133 | *.DotSettings.user 134 | 135 | # TeamCity is a build add-in 136 | _TeamCity* 137 | 138 | # DotCover is a Code Coverage Tool 139 | *.dotCover 140 | 141 | # AxoCover is a Code Coverage Tool 142 | .axoCover/* 143 | !.axoCover/settings.json 144 | 145 | # Coverlet is a free, cross platform Code Coverage Tool 146 | coverage*.json 147 | coverage*.xml 148 | coverage*.info 149 | 150 | # Visual Studio code coverage results 151 | *.coverage 152 | *.coveragexml 153 | 154 | # NCrunch 155 | _NCrunch_* 156 | .*crunch*.local.xml 157 | nCrunchTemp_* 158 | 159 | # MightyMoose 160 | *.mm.* 161 | AutoTest.Net/ 162 | 163 | # Web workbench (sass) 164 | .sass-cache/ 165 | 166 | # Installshield output folder 167 | [Ee]xpress/ 168 | 169 | # DocProject is a documentation generator add-in 170 | DocProject/buildhelp/ 171 | DocProject/Help/*.HxT 172 | DocProject/Help/*.HxC 173 | DocProject/Help/*.hhc 174 | DocProject/Help/*.hhk 175 | DocProject/Help/*.hhp 176 | DocProject/Help/Html2 177 | DocProject/Help/html 178 | 179 | # Click-Once directory 180 | publish/ 181 | 182 | # Publish Web Output 183 | *.[Pp]ublish.xml 184 | *.azurePubxml 185 | # Note: Comment the next line if you want to checkin your web deploy settings, 186 | # but database connection strings (with potential passwords) will be unencrypted 187 | *.pubxml 188 | *.publishproj 189 | 190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 191 | # checkin your Azure Web App publish settings, but sensitive information contained 192 | # in these scripts will be unencrypted 193 | PublishScripts/ 194 | 195 | # NuGet Packages 196 | *.nupkg 197 | # NuGet Symbol Packages 198 | *.snupkg 199 | # The packages folder can be ignored because of Package Restore 200 | **/[Pp]ackages/* 201 | # except build/, which is used as an MSBuild target. 202 | !**/[Pp]ackages/build/ 203 | # Uncomment if necessary however generally it will be regenerated when needed 204 | #!**/[Pp]ackages/repositories.config 205 | # NuGet v3's project.json files produces more ignorable files 206 | *.nuget.props 207 | *.nuget.targets 208 | 209 | # Microsoft Azure Build Output 210 | csx/ 211 | *.build.csdef 212 | 213 | # Microsoft Azure Emulator 214 | ecf/ 215 | rcf/ 216 | 217 | # Windows Store app package directories and files 218 | AppPackages/ 219 | BundleArtifacts/ 220 | Package.StoreAssociation.xml 221 | _pkginfo.txt 222 | *.appx 223 | *.appxbundle 224 | *.appxupload 225 | 226 | # Visual Studio cache files 227 | # files ending in .cache can be ignored 228 | *.[Cc]ache 229 | # but keep track of directories ending in .cache 230 | !?*.[Cc]ache/ 231 | 232 | # Others 233 | ClientBin/ 234 | ~$* 235 | *~ 236 | *.dbmdl 237 | *.dbproj.schemaview 238 | *.jfm 239 | *.pfx 240 | *.publishsettings 241 | orleans.codegen.cs 242 | 243 | # Including strong name files can present a security risk 244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 245 | #*.snk 246 | 247 | # Since there are multiple workflows, uncomment next line to ignore bower_components 248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 249 | #bower_components/ 250 | 251 | # RIA/Silverlight projects 252 | Generated_Code/ 253 | 254 | # Backup & report files from converting an old project file 255 | # to a newer Visual Studio version. Backup files are not needed, 256 | # because we have git ;-) 257 | _UpgradeReport_Files/ 258 | Backup*/ 259 | UpgradeLog*.XML 260 | UpgradeLog*.htm 261 | ServiceFabricBackup/ 262 | *.rptproj.bak 263 | 264 | # SQL Server files 265 | *.mdf 266 | *.ldf 267 | *.ndf 268 | 269 | # Business Intelligence projects 270 | *.rdl.data 271 | *.bim.layout 272 | *.bim_*.settings 273 | *.rptproj.rsuser 274 | *- [Bb]ackup.rdl 275 | *- [Bb]ackup ([0-9]).rdl 276 | *- [Bb]ackup ([0-9][0-9]).rdl 277 | 278 | # Microsoft Fakes 279 | FakesAssemblies/ 280 | 281 | # GhostDoc plugin setting file 282 | *.GhostDoc.xml 283 | 284 | # Node.js Tools for Visual Studio 285 | .ntvs_analysis.dat 286 | node_modules/ 287 | 288 | # Visual Studio 6 build log 289 | *.plg 290 | 291 | # Visual Studio 6 workspace options file 292 | *.opt 293 | 294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 295 | *.vbw 296 | 297 | # Visual Studio LightSwitch build output 298 | **/*.HTMLClient/GeneratedArtifacts 299 | **/*.DesktopClient/GeneratedArtifacts 300 | **/*.DesktopClient/ModelManifest.xml 301 | **/*.Server/GeneratedArtifacts 302 | **/*.Server/ModelManifest.xml 303 | _Pvt_Extensions 304 | 305 | # Paket dependency manager 306 | .paket/paket.exe 307 | paket-files/ 308 | 309 | # FAKE - F# Make 310 | .fake/ 311 | 312 | # CodeRush personal settings 313 | .cr/personal 314 | 315 | # Python Tools for Visual Studio (PTVS) 316 | __pycache__/ 317 | *.pyc 318 | 319 | # Cake - Uncomment if you are using it 320 | # tools/** 321 | # !tools/packages.config 322 | 323 | # Tabs Studio 324 | *.tss 325 | 326 | # Telerik's JustMock configuration file 327 | *.jmconfig 328 | 329 | # BizTalk build output 330 | *.btp.cs 331 | *.btm.cs 332 | *.odx.cs 333 | *.xsd.cs 334 | 335 | # OpenCover UI analysis results 336 | OpenCover/ 337 | 338 | # Azure Stream Analytics local run output 339 | ASALocalRun/ 340 | 341 | # MSBuild Binary and Structured Log 342 | *.binlog 343 | 344 | # NVidia Nsight GPU debugger configuration file 345 | *.nvuser 346 | 347 | # MFractors (Xamarin productivity tool) working folder 348 | .mfractor/ 349 | 350 | # Local History for Visual Studio 351 | .localhistory/ 352 | 353 | # BeatPulse healthcheck temp database 354 | healthchecksdb 355 | 356 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 357 | MigrationBackup/ 358 | 359 | # Ionide (cross platform F# VS Code tools) working folder 360 | .ionide/ 361 | 362 | # Fody - auto-generated XML schema 363 | FodyWeavers.xsd -------------------------------------------------------------------------------- /Controllers/CustomerController.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using CustomerAPI.Models; 7 | using Microsoft.AspNetCore.Authorization; 8 | 9 | // For more information on enabling Web API for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860 10 | 11 | namespace CustomerAPI.Controllers 12 | { 13 | [Authorize(Roles = "admin")] 14 | [Route("[controller]")] 15 | [ApiController] 16 | public class CustomerController : ControllerBase 17 | { 18 | private readonly Learn_DBContext context; 19 | public CustomerController(Learn_DBContext learn_DB) 20 | { 21 | context = learn_DB; 22 | } 23 | // GET: api/ 24 | [HttpGet] 25 | public IEnumerable Get() 26 | { 27 | return context.TblCustomer.ToList(); 28 | } 29 | 30 | // GET api//5 31 | [HttpGet("{id}")] 32 | public string Get(int id) 33 | { 34 | return "value"; 35 | } 36 | 37 | // POST api/ 38 | [HttpPost] 39 | public void Post([FromBody] string value) 40 | { 41 | } 42 | 43 | // PUT api//5 44 | [HttpPut("{id}")] 45 | public void Put(int id, [FromBody] string value) 46 | { 47 | } 48 | 49 | // DELETE api//5 50 | [HttpDelete("{id}")] 51 | public void Delete(int id) 52 | { 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Controllers/DesignationController.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Http; 2 | using Microsoft.AspNetCore.Mvc; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | using CustomerAPI.Models; 8 | 9 | namespace CustomerAPI.Controllers 10 | { 11 | [Route("[controller]")] 12 | [ApiController] 13 | public class DesignationController : ControllerBase 14 | { 15 | private readonly Learn_DBContext context; 16 | public DesignationController(Learn_DBContext learn_DB) 17 | { 18 | context = learn_DB; 19 | } 20 | // GET: api/ 21 | [HttpGet] 22 | public IEnumerable Get() 23 | { 24 | return context.TblDesignation.ToList(); 25 | } 26 | [HttpGet("{id}")] 27 | public TblDesignation Get(string id) 28 | { 29 | return context.TblDesignation.FirstOrDefault(o => o.Code == id); 30 | } 31 | [HttpPost] 32 | public APIResponse Post([FromBody] TblDesignation value) 33 | { 34 | string result = string.Empty; 35 | try 36 | { 37 | var _emp = context.TblDesignation.FirstOrDefault(o => o.Code == value.Code); 38 | if (_emp != null) 39 | { 40 | _emp.Name = value.Name; 41 | context.SaveChanges(); 42 | result = "pass"; 43 | } 44 | else 45 | { 46 | TblDesignation tblEmployee = new TblDesignation() 47 | { 48 | Name = value.Name, 49 | Code = value.Code 50 | }; 51 | context.TblDesignation.Add(tblEmployee); 52 | context.SaveChanges(); 53 | result = "pass"; 54 | } 55 | 56 | } 57 | catch (Exception ex) 58 | { 59 | result = string.Empty; 60 | } 61 | return new APIResponse { keycode = string.Empty, result = result }; 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /Controllers/EmployeeController.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Http; 2 | using Microsoft.AspNetCore.Mvc; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | using CustomerAPI.Models; 8 | using Microsoft.AspNetCore.Authorization; 9 | 10 | namespace CustomerAPI.Controllers 11 | { 12 | //[Authorize] 13 | [Route("[controller]")] 14 | [ApiController] 15 | public class EmployeeController : ControllerBase 16 | { 17 | private readonly Learn_DBContext context; 18 | public EmployeeController(Learn_DBContext learn_DB) 19 | { 20 | context = learn_DB; 21 | } 22 | // GET: api/ 23 | [HttpGet] 24 | public IEnumerable Get() 25 | { 26 | return context.TblEmployee.ToList(); 27 | } 28 | [HttpGet("{id}")] 29 | public TblEmployee Get(int id) 30 | { 31 | return context.TblEmployee.FirstOrDefault(o => o.Code == id); 32 | } 33 | 34 | [HttpPost] 35 | public APIResponse Post([FromBody] TblEmployee value) 36 | { 37 | string result = string.Empty; 38 | try 39 | { 40 | var _emp = context.TblEmployee.FirstOrDefault(o => o.Code == value.Code); 41 | if (_emp != null) 42 | { 43 | _emp.Designation = value.Designation; 44 | _emp.Email = value.Email; 45 | _emp.Name = value.Name; 46 | _emp.Phone = value.Phone; 47 | context.SaveChanges(); 48 | result= "pass"; 49 | } 50 | else 51 | { 52 | TblEmployee tblEmployee = new TblEmployee() 53 | { 54 | Name = value.Name, 55 | Email = value.Email, 56 | Phone = value.Phone, 57 | Designation = value.Designation 58 | }; 59 | context.TblEmployee.Add(tblEmployee); 60 | context.SaveChanges(); 61 | result= "pass"; 62 | } 63 | 64 | } 65 | catch(Exception ex) 66 | { 67 | result= string.Empty; 68 | } 69 | return new APIResponse { keycode = string.Empty, result = result }; 70 | } 71 | 72 | [HttpDelete("{id}")] 73 | public APIResponse Delete(int id) 74 | { 75 | string result = string.Empty; 76 | var _emp=context.TblEmployee.FirstOrDefault(o => o.Code == id); 77 | if (_emp != null) 78 | { 79 | context.TblEmployee.Remove(_emp); 80 | context.SaveChanges(); 81 | result= "pass"; 82 | } 83 | return new APIResponse { keycode = string.Empty, result = result }; 84 | } 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /Controllers/ProductController.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Http; 2 | using Microsoft.AspNetCore.Mvc; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | using CustomerAPI.Models; 8 | using Microsoft.AspNetCore.Authorization; 9 | using System.IO; 10 | using CustomerAPI.Entities; 11 | using Microsoft.AspNetCore.Hosting; 12 | 13 | namespace CustomerAPI.Controllers 14 | { 15 | [Route("api/[controller]")] 16 | [ApiController] 17 | public class ProductController : ControllerBase 18 | { 19 | private readonly Learn_DBContext context; 20 | private IWebHostEnvironment hostingEnv; 21 | public ProductController(Learn_DBContext learn_DB, IWebHostEnvironment environment) 22 | { 23 | context = learn_DB; 24 | hostingEnv = environment; 25 | } 26 | // GET: api/ 27 | [HttpGet] 28 | public IEnumerable Get() 29 | { 30 | return context.TblProduct.ToList(); 31 | } 32 | 33 | [HttpGet("{id}")] 34 | public TblProduct Get(int id) 35 | { 36 | return context.TblProduct.FirstOrDefault(o => o.Code == id); 37 | } 38 | 39 | [HttpGet("GetProductwithimage")] 40 | public IEnumerable GetProductwithimage() 41 | { 42 | List _list = new List(); 43 | var _product = context.TblProduct.ToList(); 44 | if (_product != null && _product.Count > 0) 45 | { 46 | _product.ForEach(item => 47 | { 48 | _list.Add(new Product() 49 | { 50 | Code = item.Code, 51 | Name = item.Name, 52 | Amount = item.Amount, 53 | ProductImage = GetImagebycode(item.Code) 54 | }); 55 | 56 | }); 57 | 58 | } 59 | return _list; 60 | } 61 | 62 | [HttpGet("GetProductwithimagebycode/{id}")] 63 | public IEnumerable GetProductwithimagebycode(int id) 64 | { 65 | List _list = new List(); 66 | var _product = context.TblProduct.FirstOrDefault(item => item.Code == id); 67 | if (_product != null) 68 | { 69 | string apppath = "https://localhost:44308"; 70 | string imagepath = "/Uploads/Product/" + id; 71 | string[] filePaths = Directory.GetFiles(hostingEnv.ContentRootPath + "/wwwroot"+imagepath); 72 | 73 | for (int i = 0; i < filePaths.Length; i++) 74 | { 75 | string filename = Path.GetFileName(filePaths[i]); 76 | string productimage = apppath + imagepath + "/" + filename; 77 | _list.Add(new Product() 78 | { 79 | Code = _product.Code, 80 | Name = _product.Name, 81 | Amount = _product.Amount, 82 | ProductImage = productimage 83 | }); 84 | } 85 | 86 | } 87 | return _list; 88 | } 89 | 90 | 91 | [HttpPost] 92 | public APIResponse Post([FromBody] TblProduct value) 93 | { 94 | string result = string.Empty; 95 | try 96 | { 97 | var _emp = context.TblProduct.FirstOrDefault(o => o.Code == value.Code); 98 | if (_emp != null) 99 | { 100 | _emp.Code = value.Code; 101 | _emp.Amount = value.Amount; 102 | _emp.Name = value.Name; 103 | context.SaveChanges(); 104 | result = "pass"; 105 | } 106 | else 107 | { 108 | TblProduct TblProduct = new TblProduct() 109 | { 110 | Name = value.Name, 111 | Code = value.Code, 112 | Amount = value.Amount 113 | }; 114 | context.TblProduct.Add(TblProduct); 115 | context.SaveChanges(); 116 | result = "pass"; 117 | } 118 | 119 | } 120 | catch (Exception ex) 121 | { 122 | result = string.Empty; 123 | } 124 | return new APIResponse { keycode = string.Empty, result = result }; 125 | } 126 | 127 | [HttpDelete("{id}")] 128 | public APIResponse Delete(int id) 129 | { 130 | string result = string.Empty; 131 | var _emp = context.TblProduct.FirstOrDefault(o => o.Code == id); 132 | if (_emp != null) 133 | { 134 | context.TblProduct.Remove(_emp); 135 | context.SaveChanges(); 136 | result = "pass"; 137 | } 138 | return new APIResponse { keycode = string.Empty, result = result }; 139 | } 140 | 141 | [HttpPost("UploadImage")] 142 | public async Task UploadImage() 143 | { 144 | bool Result = false; 145 | var Files = Request.Form.Files; 146 | foreach (IFormFile source in Files) 147 | { 148 | string FileName = source.FileName; 149 | string imagepath = GetActualpath(FileName); 150 | try 151 | { 152 | if (!System.IO.Directory.Exists(imagepath)) 153 | System.IO.Directory.CreateDirectory(imagepath); 154 | 155 | string Filepath = imagepath + "\\1.png"; 156 | 157 | if (System.IO.File.Exists(Filepath)) 158 | System.IO.File.Delete(Filepath); 159 | 160 | using (FileStream stream = System.IO.File.Create(Filepath)) 161 | { 162 | await source.CopyToAsync(stream); 163 | Result = true; 164 | } 165 | } 166 | catch (Exception ex) 167 | { 168 | throw ex; 169 | } 170 | } 171 | 172 | return Ok(Result); 173 | 174 | } 175 | [HttpGet("RemoveImage/{Code}")] 176 | public APIResponse RemoveImage(string Code) 177 | { 178 | string Result = string.Empty; 179 | string FileName = Code; 180 | string imagepath = GetActualpath(FileName); 181 | try 182 | { 183 | 184 | string Filepath = imagepath + "\\1.png"; 185 | 186 | if (System.IO.File.Exists(Filepath)) 187 | System.IO.File.Delete(Filepath); 188 | 189 | Result = "pass"; 190 | } 191 | catch (Exception ex) 192 | { 193 | throw ex; 194 | } 195 | 196 | return new APIResponse { keycode = Code, result = Result }; 197 | 198 | } 199 | 200 | [NonAction] 201 | public string GetActualpath(string FileName) 202 | { 203 | return hostingEnv.WebRootPath+"\\Uploads\\Product\\" + FileName; 204 | } 205 | 206 | [NonAction] 207 | private string GetImagebycode(int Code) 208 | { 209 | string hosturl = "https://localhost:44308"; 210 | string mainimagepath = GetActualpath(Code.ToString()); 211 | string Filepath = mainimagepath + "\\1.png"; 212 | 213 | if (System.IO.File.Exists(Filepath)) 214 | return hosturl + "/Uploads/Product/" + Code + "/1.png"; 215 | else 216 | return hosturl + "/Uploads/Common/noimage.png"; 217 | } 218 | 219 | 220 | } 221 | } 222 | -------------------------------------------------------------------------------- /Controllers/UserController.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Http; 2 | using Microsoft.AspNetCore.Mvc; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | using CustomerAPI.Models; 8 | using Microsoft.Extensions.Options; 9 | using System.IdentityModel.Tokens.Jwt; 10 | using System.Text; 11 | using Microsoft.IdentityModel.Tokens; 12 | using System.Security.Claims; 13 | 14 | namespace CustomerAPI.Controllers 15 | { 16 | [Route("[controller]")] 17 | [ApiController] 18 | public class UserController : ControllerBase 19 | { 20 | private readonly Learn_DBContext context; 21 | private readonly JWTSetting setting; 22 | private readonly IRefreshTokenGenerator tokenGenerator; 23 | public UserController(Learn_DBContext learn_DB, IOptions options, IRefreshTokenGenerator _refreshToken) 24 | { 25 | context = learn_DB; 26 | setting = options.Value; 27 | tokenGenerator = _refreshToken; 28 | } 29 | 30 | [NonAction] 31 | public TokenResponse Authenticate(string username,Claim[] claims) 32 | { 33 | TokenResponse tokenResponse = new TokenResponse(); 34 | var tokenkey = Encoding.UTF8.GetBytes(setting.securitykey); 35 | var tokenhandler = new JwtSecurityToken( 36 | claims: claims, 37 | expires: DateTime.Now.AddMinutes(15), 38 | signingCredentials: new SigningCredentials(new SymmetricSecurityKey(tokenkey), SecurityAlgorithms.HmacSha256) 39 | 40 | ); 41 | tokenResponse.JWTToken = new JwtSecurityTokenHandler().WriteToken(tokenhandler); 42 | tokenResponse.RefreshToken = tokenGenerator.GenerateToken(username); 43 | 44 | return tokenResponse; 45 | } 46 | 47 | [Route("Authenticate")] 48 | [HttpPost] 49 | public IActionResult Authenticate([FromBody] usercred user) 50 | { 51 | TokenResponse tokenResponse = new TokenResponse(); 52 | var _user = context.TblUser.FirstOrDefault(o => o.Userid == user.username && o.Password == user.password && o.IsActive==true); 53 | if (_user == null) 54 | return Unauthorized(); 55 | 56 | var tokenhandler = new JwtSecurityTokenHandler(); 57 | var tokenkey = Encoding.UTF8.GetBytes(setting.securitykey); 58 | var tokenDescriptor = new SecurityTokenDescriptor 59 | { 60 | Subject = new ClaimsIdentity( 61 | new Claim[] 62 | { 63 | new Claim(ClaimTypes.Name, _user.Userid), 64 | new Claim(ClaimTypes.Role, _user.Role) 65 | 66 | } 67 | ), 68 | Expires = DateTime.Now.AddMinutes(20), 69 | SigningCredentials = new SigningCredentials(new SymmetricSecurityKey(tokenkey), SecurityAlgorithms.HmacSha256) 70 | }; 71 | var token = tokenhandler.CreateToken(tokenDescriptor); 72 | string finaltoken = tokenhandler.WriteToken(token); 73 | 74 | tokenResponse.JWTToken = finaltoken; 75 | tokenResponse.RefreshToken = tokenGenerator.GenerateToken(user.username); 76 | 77 | return Ok(tokenResponse); 78 | } 79 | 80 | [Route("Refresh")] 81 | [HttpPost] 82 | public IActionResult Refresh([FromBody] TokenResponse token) 83 | { 84 | 85 | var tokenHandler = new JwtSecurityTokenHandler(); 86 | var securityToken = (JwtSecurityToken)tokenHandler.ReadToken(token.JWTToken); 87 | var username = securityToken.Claims.FirstOrDefault(c => c.Type == "unique_name")?.Value; 88 | 89 | 90 | //var username = principal.Identity.Name; 91 | var _reftable = context.TblRefreshtoken.FirstOrDefault(o => o.UserId == username && o.RefreshToken == token.RefreshToken); 92 | if (_reftable == null) 93 | { 94 | return Unauthorized(); 95 | } 96 | TokenResponse _result = Authenticate(username, securityToken.Claims.ToArray()); 97 | return Ok(_result); 98 | } 99 | 100 | [Route("GetMenubyRole/{role}")] 101 | [HttpGet] 102 | public IActionResult GetMenubyRole(string role) 103 | { 104 | var _result = (from q1 in context.TblPermission.Where(item=>item.RoleId==role) 105 | join q2 in context.TblMenu 106 | on q1.MenuId equals q2.Id 107 | select new { q1.MenuId, q2.Name, q2.LinkName }).ToList(); 108 | // var _result = context.TblPermission.Where(o => o.RoleId == role).ToList(); 109 | 110 | return Ok(_result); 111 | } 112 | 113 | [Route("HaveAccess")] 114 | [HttpGet] 115 | public IActionResult HaveAccess(string role,string menu) 116 | { 117 | APIResponse result = new APIResponse(); 118 | //var username = principal.Identity.Name; 119 | var _result = context.TblPermission.Where(o => o.RoleId == role && o.MenuId == menu).FirstOrDefault(); 120 | if (_result != null) 121 | { 122 | result.result = "pass"; 123 | } 124 | return Ok(result); 125 | } 126 | 127 | [Route("GetAllRole")] 128 | [HttpGet] 129 | public IActionResult GetAllRole() 130 | { 131 | var _result = context.TblRole.ToList(); 132 | // var _result = context.TblPermission.Where(o => o.RoleId == role).ToList(); 133 | 134 | return Ok(_result); 135 | } 136 | 137 | [HttpPost("Register")] 138 | public APIResponse Register([FromBody] TblUser value) 139 | { 140 | string result = string.Empty; 141 | try 142 | { 143 | var _emp = context.TblUser.FirstOrDefault(o => o.Userid == value.Userid); 144 | if (_emp != null) 145 | { 146 | result = string.Empty; 147 | } 148 | else 149 | { 150 | TblUser tblUser = new TblUser() 151 | { 152 | Name = value.Name, 153 | Email = value.Email, 154 | Userid = value.Userid, 155 | Role = string.Empty, 156 | Password = value.Password, 157 | IsActive = false 158 | }; 159 | context.TblUser.Add(tblUser); 160 | context.SaveChanges(); 161 | result = "pass"; 162 | } 163 | } 164 | catch (Exception ex) 165 | { 166 | result = string.Empty; 167 | } 168 | return new APIResponse { keycode = string.Empty, result = result }; 169 | } 170 | 171 | } 172 | } 173 | -------------------------------------------------------------------------------- /Controllers/UserMasterController.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Http; 2 | using Microsoft.AspNetCore.Mvc; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | using CustomerAPI.Models; 8 | using Microsoft.AspNetCore.Authorization; 9 | 10 | namespace CustomerAPI.Controllers 11 | { 12 | [Authorize] 13 | [Route("api/[controller]")] 14 | [ApiController] 15 | public class UserMasterController : ControllerBase 16 | { 17 | private readonly Learn_DBContext context; 18 | public UserMasterController(Learn_DBContext learn_DB) 19 | { 20 | context = learn_DB; 21 | } 22 | // GET: api/ 23 | [HttpGet] 24 | public IEnumerable Get() 25 | { 26 | return context.TblUser.ToList(); 27 | } 28 | 29 | [HttpGet("{id}")] 30 | public TblUser Get(string id) 31 | { 32 | return context.TblUser.FirstOrDefault(o => o.Userid == id); 33 | } 34 | 35 | [HttpPost("Save")] 36 | public APIResponse Save([FromBody] TblUser value) 37 | { 38 | string result = string.Empty; 39 | try 40 | { 41 | var _emp = context.TblUser.FirstOrDefault(o => o.Userid == value.Userid); 42 | if (_emp != null) 43 | { 44 | _emp.Role = value.Role; 45 | _emp.Email = value.Email; 46 | _emp.Name = value.Name; 47 | _emp.IsActive = value.IsActive; 48 | context.SaveChanges(); 49 | result = "pass"; 50 | } 51 | else 52 | { 53 | TblUser tblUser = new TblUser() 54 | { 55 | Name = value.Name, 56 | Email = value.Email, 57 | Userid = value.Userid, 58 | Role = value.Role, 59 | // Password = value.Password, 60 | IsActive = true 61 | }; 62 | context.TblUser.Add(tblUser); 63 | context.SaveChanges(); 64 | result = "pass"; 65 | } 66 | 67 | } 68 | catch (Exception ex) 69 | { 70 | result = string.Empty; 71 | } 72 | return new APIResponse { keycode = string.Empty, result = result }; 73 | } 74 | 75 | [HttpPost("ActivateUser")] 76 | public APIResponse ActivateUser([FromBody] TblUser value) 77 | { 78 | string result = string.Empty; 79 | try 80 | { 81 | var _emp = context.TblUser.FirstOrDefault(o => o.Userid == value.Userid); 82 | if (_emp != null) 83 | { 84 | _emp.Role = value.Role; 85 | _emp.IsActive = value.IsActive; 86 | context.SaveChanges(); 87 | result = "pass"; 88 | } 89 | } 90 | catch (Exception ex) 91 | { 92 | result = string.Empty; 93 | } 94 | return new APIResponse { keycode = string.Empty, result = result }; 95 | } 96 | 97 | [HttpDelete("{id}")] 98 | public APIResponse Delete(string id) 99 | { 100 | string result = string.Empty; 101 | var _emp = context.TblUser.FirstOrDefault(o => o.Userid == id); 102 | if (_emp != null) 103 | { 104 | context.TblUser.Remove(_emp); 105 | context.SaveChanges(); 106 | result = "pass"; 107 | } 108 | return new APIResponse { keycode = string.Empty, result = result }; 109 | } 110 | 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /CustomerAPI.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netcoreapp3.1 5 | 711a3408-2b87-4182-b222-9a7fa9bebe0f 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | all 15 | runtime; build; native; contentfiles; analyzers; buildtransitive 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /CustomerAPI.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.31205.134 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomerAPI", "CustomerAPI.csproj", "{03240B39-EEB2-49A3-8291-2E7643CECBF3}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {03240B39-EEB2-49A3-8291-2E7643CECBF3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {03240B39-EEB2-49A3-8291-2E7643CECBF3}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {03240B39-EEB2-49A3-8291-2E7643CECBF3}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {03240B39-EEB2-49A3-8291-2E7643CECBF3}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {DD078E8C-30E3-4EA1-B25B-AB2FB24660DC} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /Entities/Product.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace CustomerAPI.Entities 7 | { 8 | public class Product 9 | { 10 | public int Code { get; set; } 11 | public string Name { get; set; } 12 | public decimal? Amount { get; set; } 13 | public string ProductImage { get; set; } 14 | 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /IRefreshTokenGenerator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace CustomerAPI 7 | { 8 | public interface IRefreshTokenGenerator 9 | { 10 | string GenerateToken(string username); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Models/APIResponse.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace CustomerAPI.Models 7 | { 8 | public class APIResponse 9 | { 10 | public string keycode { get; set; } 11 | public string result { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Models/Category.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace CustomerAPI.Models 5 | { 6 | public partial class Category 7 | { 8 | public int Id { get; set; } 9 | public string Name { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Models/JWTSetting.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace CustomerAPI.Models 7 | { 8 | public class JWTSetting 9 | { 10 | public string securitykey { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Models/Learn_DBContext.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.EntityFrameworkCore; 3 | using Microsoft.EntityFrameworkCore.Metadata; 4 | 5 | namespace CustomerAPI.Models 6 | { 7 | public partial class Learn_DBContext : DbContext 8 | { 9 | public Learn_DBContext() 10 | { 11 | } 12 | 13 | public Learn_DBContext(DbContextOptions options) 14 | : base(options) 15 | { 16 | } 17 | 18 | public virtual DbSet Category { get; set; } 19 | public virtual DbSet TblCustomer { get; set; } 20 | public virtual DbSet TblDesignation { get; set; } 21 | public virtual DbSet TblEmployee { get; set; } 22 | public virtual DbSet TblMenu { get; set; } 23 | public virtual DbSet TblPermission { get; set; } 24 | public virtual DbSet TblProduct { get; set; } 25 | public virtual DbSet TblRefreshtoken { get; set; } 26 | public virtual DbSet TblRole { get; set; } 27 | public virtual DbSet TblUser { get; set; } 28 | 29 | protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) 30 | { 31 | if (!optionsBuilder.IsConfigured) 32 | { 33 | #warning To protect potentially sensitive information in your connection string, you should move it out of source code. See http://go.microsoft.com/fwlink/?LinkId=723263 for guidance on storing connection strings. 34 | optionsBuilder.UseSqlServer("Server=LAPTOP-4K7AS2ME\\SQLEXPRESS;Database=Learn_DB;Trusted_Connection=True;"); 35 | } 36 | } 37 | 38 | protected override void OnModelCreating(ModelBuilder modelBuilder) 39 | { 40 | modelBuilder.Entity(entity => 41 | { 42 | entity.ToTable("tbl_customer"); 43 | 44 | entity.Property(e => e.Id).HasColumnName("ID"); 45 | 46 | entity.Property(e => e.CreditLimit).HasDefaultValueSql("((0))"); 47 | 48 | entity.Property(e => e.Email) 49 | .HasMaxLength(50) 50 | .IsUnicode(false); 51 | 52 | entity.Property(e => e.Name) 53 | .HasMaxLength(50) 54 | .IsUnicode(false); 55 | 56 | entity.Property(e => e.Phone) 57 | .HasMaxLength(50) 58 | .IsUnicode(false); 59 | }); 60 | 61 | modelBuilder.Entity(entity => 62 | { 63 | entity.HasKey(e => e.Code); 64 | 65 | entity.ToTable("tbl_designation"); 66 | 67 | entity.Property(e => e.Code) 68 | .HasColumnName("code") 69 | .HasMaxLength(10); 70 | 71 | entity.Property(e => e.Name).HasMaxLength(50); 72 | }); 73 | 74 | modelBuilder.Entity(entity => 75 | { 76 | entity.HasKey(e => e.Code); 77 | 78 | entity.ToTable("tbl_employee"); 79 | 80 | entity.Property(e => e.Code).HasColumnName("code"); 81 | 82 | entity.Property(e => e.Designation) 83 | .HasColumnName("designation") 84 | .HasMaxLength(50) 85 | .IsUnicode(false); 86 | 87 | entity.Property(e => e.Email) 88 | .HasColumnName("email") 89 | .HasMaxLength(50) 90 | .IsUnicode(false); 91 | 92 | entity.Property(e => e.Name) 93 | .HasColumnName("name") 94 | .HasMaxLength(50) 95 | .IsUnicode(false); 96 | 97 | entity.Property(e => e.Phone) 98 | .HasMaxLength(50) 99 | .IsUnicode(false); 100 | }); 101 | 102 | modelBuilder.Entity(entity => 103 | { 104 | entity.ToTable("tbl_menu"); 105 | 106 | entity.Property(e => e.Id) 107 | .HasMaxLength(50) 108 | .IsUnicode(false); 109 | 110 | entity.Property(e => e.LinkName) 111 | .HasMaxLength(50) 112 | .IsUnicode(false); 113 | 114 | entity.Property(e => e.Name) 115 | .HasMaxLength(50) 116 | .IsUnicode(false); 117 | }); 118 | 119 | modelBuilder.Entity(entity => 120 | { 121 | entity.HasKey(e => new { e.RoleId, e.MenuId }); 122 | 123 | entity.ToTable("tbl_permission"); 124 | 125 | entity.Property(e => e.RoleId) 126 | .HasMaxLength(50) 127 | .IsUnicode(false); 128 | 129 | entity.Property(e => e.MenuId) 130 | .HasMaxLength(50) 131 | .IsUnicode(false); 132 | }); 133 | 134 | modelBuilder.Entity(entity => 135 | { 136 | entity.HasKey(e => e.Code); 137 | 138 | entity.ToTable("tbl_product"); 139 | 140 | entity.Property(e => e.Amount).HasColumnType("decimal(18, 3)"); 141 | 142 | entity.Property(e => e.Name) 143 | .HasMaxLength(50) 144 | .IsUnicode(false); 145 | }); 146 | 147 | modelBuilder.Entity(entity => 148 | { 149 | entity.HasKey(e => e.UserId); 150 | 151 | entity.ToTable("tbl_refreshtoken"); 152 | 153 | entity.Property(e => e.UserId) 154 | .HasMaxLength(50) 155 | .IsUnicode(false); 156 | 157 | entity.Property(e => e.TokenId) 158 | .HasMaxLength(50) 159 | .IsUnicode(false); 160 | }); 161 | 162 | modelBuilder.Entity(entity => 163 | { 164 | entity.HasKey(e => e.Roleid); 165 | 166 | entity.ToTable("tbl_role"); 167 | 168 | entity.Property(e => e.Roleid) 169 | .HasColumnName("roleid") 170 | .HasMaxLength(50) 171 | .IsUnicode(false); 172 | 173 | entity.Property(e => e.Name) 174 | .HasMaxLength(50) 175 | .IsUnicode(false); 176 | }); 177 | 178 | modelBuilder.Entity(entity => 179 | { 180 | entity.HasKey(e => e.Userid); 181 | 182 | entity.ToTable("tbl_user"); 183 | 184 | entity.Property(e => e.Userid) 185 | .HasColumnName("userid") 186 | .HasMaxLength(50) 187 | .IsUnicode(false); 188 | 189 | entity.Property(e => e.Email) 190 | .HasMaxLength(50) 191 | .IsUnicode(false); 192 | 193 | entity.Property(e => e.IsActive).HasDefaultValueSql("((1))"); 194 | 195 | entity.Property(e => e.Name) 196 | .HasMaxLength(50) 197 | .IsUnicode(false); 198 | 199 | entity.Property(e => e.Password) 200 | .HasColumnName("password") 201 | .HasMaxLength(50) 202 | .IsUnicode(false); 203 | 204 | entity.Property(e => e.Role) 205 | .HasMaxLength(50) 206 | .IsUnicode(false); 207 | }); 208 | 209 | OnModelCreatingPartial(modelBuilder); 210 | } 211 | 212 | partial void OnModelCreatingPartial(ModelBuilder modelBuilder); 213 | } 214 | } 215 | -------------------------------------------------------------------------------- /Models/TblCustomer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace CustomerAPI.Models 5 | { 6 | public partial class TblCustomer 7 | { 8 | public int Id { get; set; } 9 | public string Name { get; set; } 10 | public string Email { get; set; } 11 | public string Phone { get; set; } 12 | public int? CreditLimit { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Models/TblDesignation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace CustomerAPI.Models 5 | { 6 | public partial class TblDesignation 7 | { 8 | public string Code { get; set; } 9 | public string Name { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Models/TblEmployee.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace CustomerAPI.Models 5 | { 6 | public partial class TblEmployee 7 | { 8 | public int Code { get; set; } 9 | public string Name { get; set; } 10 | public string Email { get; set; } 11 | public string Phone { get; set; } 12 | public string Designation { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Models/TblMenu.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace CustomerAPI.Models 5 | { 6 | public partial class TblMenu 7 | { 8 | public string Id { get; set; } 9 | public string Name { get; set; } 10 | public string LinkName { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Models/TblPermission.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace CustomerAPI.Models 5 | { 6 | public partial class TblPermission 7 | { 8 | public string RoleId { get; set; } 9 | public string MenuId { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Models/TblProduct.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace CustomerAPI.Models 5 | { 6 | public partial class TblProduct 7 | { 8 | public int Code { get; set; } 9 | public string Name { get; set; } 10 | public decimal? Amount { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Models/TblRefreshtoken.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace CustomerAPI.Models 5 | { 6 | public partial class TblRefreshtoken 7 | { 8 | public string UserId { get; set; } 9 | public string TokenId { get; set; } 10 | public string RefreshToken { get; set; } 11 | public bool? IsActive { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Models/TblRole.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace CustomerAPI.Models 5 | { 6 | public partial class TblRole 7 | { 8 | public string Roleid { get; set; } 9 | public string Name { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Models/TblUser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace CustomerAPI.Models 5 | { 6 | public partial class TblUser 7 | { 8 | public string Userid { get; set; } 9 | public string Name { get; set; } 10 | public string Password { get; set; } 11 | public string Email { get; set; } 12 | public string Role { get; set; } 13 | public bool? IsActive { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Models/TokenResponse.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace CustomerAPI.Models 7 | { 8 | public class TokenResponse 9 | { 10 | public string JWTToken { get; set; } 11 | public string RefreshToken { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Models/usercred.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace CustomerAPI.Models 7 | { 8 | public class usercred 9 | { 10 | public string username { get; set; } 11 | public string password { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Hosting; 2 | using Microsoft.Extensions.Configuration; 3 | using Microsoft.Extensions.Hosting; 4 | using Microsoft.Extensions.Logging; 5 | using System; 6 | using System.Collections.Generic; 7 | using System.Linq; 8 | using System.Threading.Tasks; 9 | 10 | namespace CustomerAPI 11 | { 12 | public class Program 13 | { 14 | public static void Main(string[] args) 15 | { 16 | CreateHostBuilder(args).Build().Run(); 17 | } 18 | 19 | public static IHostBuilder CreateHostBuilder(string[] args) => 20 | Host.CreateDefaultBuilder(args) 21 | .ConfigureWebHostDefaults(webBuilder => 22 | { 23 | webBuilder.UseStartup(); 24 | }); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | "windowsAuthentication": false, 5 | "anonymousAuthentication": true, 6 | "iisExpress": { 7 | "applicationUrl": "http://localhost:6605", 8 | "sslPort": 44308 9 | } 10 | }, 11 | "profiles": { 12 | "IIS Express": { 13 | "commandName": "IISExpress", 14 | "launchBrowser": true, 15 | "launchUrl": "Customer", 16 | "environmentVariables": { 17 | "ASPNETCORE_ENVIRONMENT": "Development" 18 | } 19 | }, 20 | "CustomerAPI": { 21 | "commandName": "Project", 22 | "launchBrowser": true, 23 | "launchUrl": "weatherforecast", 24 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 25 | "environmentVariables": { 26 | "ASPNETCORE_ENVIRONMENT": "Development" 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /RefreshTokenGenerator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Security.Cryptography; 5 | using System.Threading.Tasks; 6 | using CustomerAPI.Models; 7 | 8 | namespace CustomerAPI 9 | { 10 | 11 | public class RefreshTokenGenerator : IRefreshTokenGenerator 12 | { 13 | private readonly Learn_DBContext context; 14 | 15 | public RefreshTokenGenerator(Learn_DBContext learn_DB) 16 | { 17 | context = learn_DB; 18 | } 19 | public string GenerateToken(string username) 20 | { 21 | var randomnumber = new byte[32]; 22 | using (var randomnumbergenerator = RandomNumberGenerator.Create()) 23 | { 24 | randomnumbergenerator.GetBytes(randomnumber); 25 | string RefreshToken = Convert.ToBase64String(randomnumber); 26 | 27 | var _user = context.TblRefreshtoken.FirstOrDefault(o => o.UserId == username); 28 | if (_user != null) 29 | { 30 | _user.RefreshToken = RefreshToken; 31 | context.SaveChanges(); 32 | } 33 | else 34 | { 35 | TblRefreshtoken tblRefreshtoken = new TblRefreshtoken() 36 | { 37 | UserId=username, 38 | TokenId=new Random().Next().ToString(), 39 | RefreshToken= RefreshToken, 40 | IsActive=true 41 | }; 42 | } 43 | 44 | return RefreshToken; 45 | } 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /Startup.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Builder; 2 | using Microsoft.AspNetCore.Hosting; 3 | using Microsoft.AspNetCore.HttpsPolicy; 4 | using Microsoft.AspNetCore.Mvc; 5 | using Microsoft.Extensions.Configuration; 6 | using Microsoft.Extensions.DependencyInjection; 7 | using Microsoft.Extensions.Hosting; 8 | using Microsoft.Extensions.Logging; 9 | using System; 10 | using System.Collections.Generic; 11 | using System.Linq; 12 | using System.Threading.Tasks; 13 | using CustomerAPI.Models; 14 | using Microsoft.EntityFrameworkCore; 15 | using Microsoft.AspNetCore.Authentication.JwtBearer; 16 | using Microsoft.IdentityModel.Tokens; 17 | using System.Text; 18 | using Microsoft.OpenApi.Models; 19 | using Microsoft.Extensions.Primitives; 20 | using System.IO; 21 | using Microsoft.Extensions.FileProviders; 22 | using Microsoft.AspNetCore.Http; 23 | 24 | namespace CustomerAPI 25 | { 26 | public class Startup 27 | { 28 | public Startup(IConfiguration configuration) 29 | { 30 | Configuration = configuration; 31 | } 32 | 33 | public IConfiguration Configuration { get; } 34 | 35 | // This method gets called by the runtime. Use this method to add services to the container. 36 | public void ConfigureServices(IServiceCollection services) 37 | { 38 | services.AddControllers(); 39 | 40 | services.AddDbContext(options => options.UseSqlServer(Configuration.GetConnectionString("constring"))); 41 | 42 | var _dbcontext = services.BuildServiceProvider().GetService(); 43 | 44 | services.AddSingleton(provider => new RefreshTokenGenerator(_dbcontext)); 45 | 46 | var _jwtsetting = Configuration.GetSection("JWTSetting"); 47 | services.Configure(_jwtsetting); 48 | 49 | var authkey = Configuration.GetValue("JWTSetting:securitykey"); 50 | 51 | services.AddAuthentication(item => 52 | { 53 | item.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme; 54 | item.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme; 55 | }).AddJwtBearer(item => 56 | { 57 | 58 | item.RequireHttpsMetadata = true; 59 | item.SaveToken = true; 60 | item.TokenValidationParameters = new TokenValidationParameters() 61 | { 62 | ValidateIssuerSigningKey = true, 63 | IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(authkey)), 64 | ValidateIssuer = false, 65 | ValidateAudience = false, 66 | ValidateLifetime = true, 67 | ClockSkew=TimeSpan.Zero 68 | }; 69 | }); 70 | 71 | services.AddSwaggerGen(options => 72 | { 73 | options.SwaggerDoc("api", new OpenApiInfo() 74 | { 75 | Description = "Customer API with curd operations", 76 | Title = "Customer", 77 | Version = "1" 78 | }); 79 | }); 80 | 81 | services.AddCors(options => 82 | { 83 | options.AddPolicy("CorsPolicy", 84 | builder => builder 85 | .WithOrigins("http://localhost:4200","http://localhost:82") 86 | .AllowAnyMethod() 87 | .AllowAnyHeader() 88 | .AllowCredentials()); 89 | }); 90 | 91 | 92 | } 93 | 94 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. 95 | public void Configure(IApplicationBuilder app, IWebHostEnvironment env) 96 | { 97 | if (env.IsDevelopment()) 98 | { 99 | app.UseDeveloperExceptionPage(); 100 | } 101 | 102 | app.UseCors("CorsPolicy"); 103 | 104 | app.UseStaticFiles(); 105 | app.UseStaticFiles(new StaticFileOptions() 106 | { 107 | FileProvider = new PhysicalFileProvider(Path.Combine(Directory.GetCurrentDirectory(), @"Uploads")), 108 | RequestPath = new PathString("/Uploads") 109 | }); 110 | 111 | app.UseHttpsRedirection(); 112 | 113 | app.UseRouting(); 114 | 115 | app.UseAuthentication(); 116 | 117 | app.UseAuthorization(); 118 | 119 | app.UseSwagger(); 120 | 121 | // string StringValues=string.Empty; 122 | 123 | app.UseExceptionHandler(errorApp => 124 | { 125 | errorApp.Run(async context => 126 | { 127 | // Add CORS header to allow error message to be visible to Angular 128 | if (context.Request.Headers.TryGetValue("Origin", out StringValues origin)) 129 | { 130 | context.Response.Headers.Add("Access-Control-Allow-Origin", origin.ToString()); 131 | } 132 | }); 133 | }); 134 | 135 | app.UseSwaggerUI(options => options.SwaggerEndpoint("api/swagger.json", "Customer")); 136 | 137 | app.UseEndpoints(endpoints => 138 | { 139 | endpoints.MapControllers(); 140 | }); 141 | } 142 | } 143 | } 144 | -------------------------------------------------------------------------------- /appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*", 10 | "ConnectionStrings": { 11 | "constring": "Server=LAPTOP-4K7AS2ME\\SQLEXPRESS;Database=Learn_DB;Trusted_Connection=True;" 12 | }, 13 | "JWTSetting": { 14 | "securitykey": "thisismysecretkey" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /wwwroot/Uploads/Common/noimage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/Uploads/Common/noimage.png -------------------------------------------------------------------------------- /wwwroot/Uploads/Product/1/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/Uploads/Product/1/1.png -------------------------------------------------------------------------------- /wwwroot/Uploads/Product/1/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/Uploads/Product/1/2.png -------------------------------------------------------------------------------- /wwwroot/Uploads/Product/1/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/Uploads/Product/1/3.png -------------------------------------------------------------------------------- /wwwroot/Uploads/Product/1/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/Uploads/Product/1/4.png -------------------------------------------------------------------------------- /wwwroot/Uploads/Product/10/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/Uploads/Product/10/1.png -------------------------------------------------------------------------------- /wwwroot/Uploads/Product/10/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/Uploads/Product/10/2.png -------------------------------------------------------------------------------- /wwwroot/Uploads/Product/10/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/Uploads/Product/10/3.png -------------------------------------------------------------------------------- /wwwroot/Uploads/Product/10/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/Uploads/Product/10/4.png -------------------------------------------------------------------------------- /wwwroot/Uploads/Product/11/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/Uploads/Product/11/1.png -------------------------------------------------------------------------------- /wwwroot/Uploads/Product/11/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/Uploads/Product/11/2.png -------------------------------------------------------------------------------- /wwwroot/Uploads/Product/11/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/Uploads/Product/11/3.png -------------------------------------------------------------------------------- /wwwroot/Uploads/Product/11/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/Uploads/Product/11/4.png -------------------------------------------------------------------------------- /wwwroot/Uploads/Product/14/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/Uploads/Product/14/1.png -------------------------------------------------------------------------------- /wwwroot/Uploads/Product/15/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/Uploads/Product/15/1.png -------------------------------------------------------------------------------- /wwwroot/Uploads/Product/16/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/Uploads/Product/16/1.png -------------------------------------------------------------------------------- /wwwroot/Uploads/Product/2/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/Uploads/Product/2/1.png -------------------------------------------------------------------------------- /wwwroot/Uploads/Product/2/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/Uploads/Product/2/2.png -------------------------------------------------------------------------------- /wwwroot/Uploads/Product/2/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/Uploads/Product/2/3.png -------------------------------------------------------------------------------- /wwwroot/Uploads/Product/2/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/Uploads/Product/2/4.png -------------------------------------------------------------------------------- /wwwroot/Uploads/Product/5/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/Uploads/Product/5/1.png -------------------------------------------------------------------------------- /wwwroot/Uploads/Product/5/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/Uploads/Product/5/2.png -------------------------------------------------------------------------------- /wwwroot/Uploads/Product/5/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/Uploads/Product/5/3.png -------------------------------------------------------------------------------- /wwwroot/Uploads/Product/5/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/Uploads/Product/5/4.png -------------------------------------------------------------------------------- /wwwroot/Uploads/Product/6/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/Uploads/Product/6/1.png -------------------------------------------------------------------------------- /wwwroot/Uploads/Product/6/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/Uploads/Product/6/2.png -------------------------------------------------------------------------------- /wwwroot/Uploads/Product/6/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/Uploads/Product/6/3.png -------------------------------------------------------------------------------- /wwwroot/Uploads/Product/6/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/Uploads/Product/6/4.png -------------------------------------------------------------------------------- /wwwroot/Uploads/Product/7/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/Uploads/Product/7/1.png -------------------------------------------------------------------------------- /wwwroot/Uploads/Product/7/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/Uploads/Product/7/2.png -------------------------------------------------------------------------------- /wwwroot/Uploads/Product/7/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/Uploads/Product/7/3.png -------------------------------------------------------------------------------- /wwwroot/Uploads/Product/7/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/Uploads/Product/7/4.png -------------------------------------------------------------------------------- /wwwroot/Uploads/Product/8/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/Uploads/Product/8/1.png -------------------------------------------------------------------------------- /wwwroot/Uploads/Product/8/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/Uploads/Product/8/2.png -------------------------------------------------------------------------------- /wwwroot/Uploads/Product/8/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/Uploads/Product/8/3.png -------------------------------------------------------------------------------- /wwwroot/Uploads/Product/8/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/Uploads/Product/8/4.png -------------------------------------------------------------------------------- /wwwroot/Uploads/Product/9/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/Uploads/Product/9/1.png -------------------------------------------------------------------------------- /wwwroot/Uploads/Product/9/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/Uploads/Product/9/2.png -------------------------------------------------------------------------------- /wwwroot/images/Common/noimage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/images/Common/noimage.png -------------------------------------------------------------------------------- /wwwroot/images/Product/1/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/images/Product/1/1.png -------------------------------------------------------------------------------- /wwwroot/images/Product/1/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/images/Product/1/2.png -------------------------------------------------------------------------------- /wwwroot/images/Product/1/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/images/Product/1/3.png -------------------------------------------------------------------------------- /wwwroot/images/Product/1/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/images/Product/1/4.png -------------------------------------------------------------------------------- /wwwroot/images/Product/10/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/images/Product/10/1.png -------------------------------------------------------------------------------- /wwwroot/images/Product/10/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/images/Product/10/2.png -------------------------------------------------------------------------------- /wwwroot/images/Product/10/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/images/Product/10/3.png -------------------------------------------------------------------------------- /wwwroot/images/Product/10/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/images/Product/10/4.png -------------------------------------------------------------------------------- /wwwroot/images/Product/11/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/images/Product/11/1.png -------------------------------------------------------------------------------- /wwwroot/images/Product/11/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/images/Product/11/2.png -------------------------------------------------------------------------------- /wwwroot/images/Product/11/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/images/Product/11/3.png -------------------------------------------------------------------------------- /wwwroot/images/Product/11/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/images/Product/11/4.png -------------------------------------------------------------------------------- /wwwroot/images/Product/2/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/images/Product/2/1.png -------------------------------------------------------------------------------- /wwwroot/images/Product/2/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/images/Product/2/2.png -------------------------------------------------------------------------------- /wwwroot/images/Product/2/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/images/Product/2/3.png -------------------------------------------------------------------------------- /wwwroot/images/Product/2/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/images/Product/2/4.png -------------------------------------------------------------------------------- /wwwroot/images/Product/5/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/images/Product/5/1.png -------------------------------------------------------------------------------- /wwwroot/images/Product/5/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/images/Product/5/2.png -------------------------------------------------------------------------------- /wwwroot/images/Product/5/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/images/Product/5/3.png -------------------------------------------------------------------------------- /wwwroot/images/Product/5/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/images/Product/5/4.png -------------------------------------------------------------------------------- /wwwroot/images/Product/6/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/images/Product/6/1.png -------------------------------------------------------------------------------- /wwwroot/images/Product/6/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/images/Product/6/2.png -------------------------------------------------------------------------------- /wwwroot/images/Product/6/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/images/Product/6/3.png -------------------------------------------------------------------------------- /wwwroot/images/Product/6/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/images/Product/6/4.png -------------------------------------------------------------------------------- /wwwroot/images/Product/7/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/images/Product/7/1.png -------------------------------------------------------------------------------- /wwwroot/images/Product/7/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/images/Product/7/2.png -------------------------------------------------------------------------------- /wwwroot/images/Product/7/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/images/Product/7/3.png -------------------------------------------------------------------------------- /wwwroot/images/Product/7/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/images/Product/7/4.png -------------------------------------------------------------------------------- /wwwroot/images/Product/8/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/images/Product/8/1.png -------------------------------------------------------------------------------- /wwwroot/images/Product/8/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/images/Product/8/2.png -------------------------------------------------------------------------------- /wwwroot/images/Product/8/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/images/Product/8/3.png -------------------------------------------------------------------------------- /wwwroot/images/Product/8/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/images/Product/8/4.png -------------------------------------------------------------------------------- /wwwroot/images/Product/9/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/images/Product/9/1.png -------------------------------------------------------------------------------- /wwwroot/images/Product/9/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nihira2020/DotNETCORE_API_JWTToken/7eb796ae473cb5290c2a534fa2a3651a9c06399b/wwwroot/images/Product/9/2.png --------------------------------------------------------------------------------