Dot net project#35
Conversation
rakshan1996
left a comment
There was a problem hiding this comment.
In Complete PR please add the .net project along with this.
| return Ok("Employee data updated by patch!"); | ||
| } | ||
|
|
||
| [Route("getAllUsers")] |
There was a problem hiding this comment.
Route Should not include http verbs . Use Restful naming conventions
There was a problem hiding this comment.
corrected route name from 'getAllUsers' to 'UsersList'.
|
|
||
| namespace EmployeeProject.Controllers | ||
| { | ||
| [Route("api/[controller]")] |
There was a problem hiding this comment.
removed ValuesController.cs
| { | ||
| if (!optionsBuilder.IsConfigured) | ||
| { | ||
| #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. |
There was a problem hiding this comment.
Connection string should not be present in Db context file . It should be initialized once in startup class and connection String should be read from app.settings.json
There was a problem hiding this comment.
made the required changes
…connection string
| public class AdminController : ControllerBase | ||
| { | ||
|
|
||
| DbModels.projectContext _projectContext; |
There was a problem hiding this comment.
Still we are using complete refrence instead of relative to create instance of classes.
|
|
||
|
|
||
| [HttpPost] | ||
| public IActionResult CreateEntry([FromBody] CustomModels.DetailsClass detailsClass) |
There was a problem hiding this comment.
Please refer to the above comment and make necessary changes.
| using Microsoft.AspNetCore.Mvc; | ||
| using Microsoft.Extensions.Configuration; | ||
| using Microsoft.IdentityModel.Tokens; | ||
|
|
| public class LoginController : ControllerBase | ||
| { | ||
| private IConfiguration _config; | ||
| public DbModels.projectContext _projectContext; |
There was a problem hiding this comment.
projectContext _projectContext;
also a Class name must not be CamelCase.
No description provided.