Click here to Skip to main content
15,883,901 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: SSL Certificate Pin
Kevin Marois21-Sep-21 4:22
professionalKevin Marois21-Sep-21 4:22 
GeneralRe: SSL Certificate Pin
Richard Deeming21-Sep-21 5:36
mveRichard Deeming21-Sep-21 5:36 
GeneralRe: SSL Certificate Pin
Kevin Marois21-Sep-21 6:02
professionalKevin Marois21-Sep-21 6:02 
GeneralRe: SSL Certificate Pin
Richard Deeming21-Sep-21 6:37
mveRichard Deeming21-Sep-21 6:37 
GeneralRe: SSL Certificate Pin
Kevin Marois21-Sep-21 6:53
professionalKevin Marois21-Sep-21 6:53 
GeneralRe: SSL Certificate Pin
SlothTheCoder29-Oct-21 15:11
professionalSlothTheCoder29-Oct-21 15:11 
QuestionAPI Controller Question Pin
Kevin Marois26-Aug-21 6:13
professionalKevin Marois26-Aug-21 6:13 
AnswerRe: API Controller Question Pin
Richard Deeming26-Aug-21 6:41
mveRichard Deeming26-Aug-21 6:41 
If you're not using it elsewhere within the base class, you can get rid of the private connectionString field.

I'd also be inclined to make the _ApiControllerBase class abstract.
C#
public abstract class _ApiControllerBase : ApiController
{
    public IBizLayer BL { get; set; }

    protected _ApiControllerBase()
    {
        string connectionString = Properties.Settings.Default.ConnectionString;
        BL = new BizLayer(connectionString);
    }
}

Beyond that, if you're happy with the routes containing the entity name, then it's fine. But if you want a proper RESTful service, you'd want the routes to look more like:
  • GET /api/controller to return the list of all entities;
  • GET /api/controller/{id} to return a specific entity;
  • POST /api/controller to add a new entity;
  • PUT (or PATCH) /api/controller/{id} to update an existing entity;
  • DELETE /api/controller/{id} to delete an entity;

The GetJobsForProject action would be the exception to this pattern. I'd probably have it as: GET /api/projects/{projectId}/jobs



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer

GeneralRe: API Controller Question Pin
Kevin Marois26-Aug-21 7:28
professionalKevin Marois26-Aug-21 7:28 
GeneralRe: API Controller Question Pin
Richard Deeming26-Aug-21 21:41
mveRichard Deeming26-Aug-21 21:41 
QuestionModal Question Pin
MekaC24-Aug-21 10:40
MekaC24-Aug-21 10:40 
Question.Net Framework Web API - Server Error Pin
Kevin Marois23-Aug-21 11:50
professionalKevin Marois23-Aug-21 11:50 
AnswerRe: .Net Framework Web API - Server Error Pin
Richard Deeming23-Aug-21 21:18
mveRichard Deeming23-Aug-21 21:18 
GeneralRe: .Net Framework Web API - Server Error Pin
Kevin Marois24-Aug-21 4:36
professionalKevin Marois24-Aug-21 4:36 
GeneralRe: .Net Framework Web API - Server Error Pin
Richard Deeming24-Aug-21 6:13
mveRichard Deeming24-Aug-21 6:13 
GeneralRe: .Net Framework Web API - Server Error Pin
Kevin Marois24-Aug-21 6:27
professionalKevin Marois24-Aug-21 6:27 
QuestionWebrequest is obselete what is the alternatieve Pin
Ger F. Versteeg26-Jul-21 23:45
Ger F. Versteeg26-Jul-21 23:45 
AnswerRe: Webrequest is obselete what is the alternatieve Pin
Richard Deeming27-Jul-21 23:57
mveRichard Deeming27-Jul-21 23:57 
GeneralRe: Webrequest is obselete what is the alternatieve Pin
Ger F. Versteeg28-Jul-21 0:58
Ger F. Versteeg28-Jul-21 0:58 
GeneralRe: Webrequest is obselete what is the alternatieve Pin
Richard Deeming28-Jul-21 3:09
mveRichard Deeming28-Jul-21 3:09 
GeneralRe: Webrequest is obselete what is the alternatieve Pin
Ger F.28-Jul-21 4:24
Ger F.28-Jul-21 4:24 
QuestionWebsite Deployment Pin
Promise Sheggs21-Jul-21 10:32
Promise Sheggs21-Jul-21 10:32 
AnswerRe: Website Deployment Pin
Member 150787164-Jul-22 18:53
Member 150787164-Jul-22 18:53 
QuestionHow to place text over an image using HTML/CSS? Pin
Alex Dunlop21-Jul-21 7:52
Alex Dunlop21-Jul-21 7:52 
AnswerRe: How to place text over an image using HTML/CSS? Pin
Member 1529865622-Jul-21 21:43
Member 1529865622-Jul-21 21:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.