Click here to Skip to main content
15,181,010 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: Hi, can someone please help me with a task that I am struggling with. Pin
Sarbjit Grewal3-Sep-20 19:32
professionalSarbjit Grewal3-Sep-20 19:32 
GeneralRe: Hi, can someone please help me with a task that I am struggling with. Pin
Mycroft Holmes4-Sep-20 13:20
professionalMycroft Holmes4-Sep-20 13:20 
AnswerRe: Hi, can someone please help me with a task that I am struggling with. Pin
Richard MacCutchan1-Aug-20 21:59
mveRichard MacCutchan1-Aug-20 21:59 
QuestionCan i use mailto for this? Pin
kingu39921-Jul-20 6:15
Memberkingu39921-Jul-20 6:15 
AnswerRe: Can i use mailto for this? Pin
Afzaal Ahmad Zeeshan1-Sep-20 10:10
mveAfzaal Ahmad Zeeshan1-Sep-20 10:10 
QuestionHow can I submit with 1 button and 1 form with 2 actions? Pin
amitb221-Jul-20 0:06
Memberamitb221-Jul-20 0:06 
AnswerRe: How can I submit with 1 button and 1 form with 2 actions? Pin
W Balboos, GHB30-Jul-20 8:06
mveW Balboos, GHB30-Jul-20 8:06 
QuestionAsp.Net Core Web API Pin
Kevin Marois15-Jul-20 12:43
professionalKevin Marois15-Jul-20 12:43 
I created an Asp.Net Core Web API project. By default it comes with a "WeatherForecastController". I run the app at "https://localhost:44368/weatherforecast", a browser opens, and I get JSON back. All's fine.

Next, I added a controller called Test with code to call my DAL (See code below) and when I try "[https://localhost:44368/Test/GetAll] I get a Not Found. . What's the right way to call these methods on the controller? Is there some routing config that I need?
[ApiController]
[Route("[controller]")]
public class TestController : _ControllerBase
{
[HttpPost]
public int Add(TestDataEntity entity)
{
    try
    {
        IRepository repo = GetRepository<TestDataRepository>();
        return repo.Add(entity);
    }
    catch (Exception e)
    {
        throw;
    }
}

[HttpDelete]
public void Delete(int id)
{
    try
    {
        IRepository repo = GetRepository<TestDataRepository>();
        repo.Delete(id);
    }
    catch (Exception e)
    {
        throw;
    }
}

[HttpGet]
public TestDataEntity Get(int id)
{
    try
    {
        IRepository repo = GetRepository<TestDataRepository>();
        return repo.Get(id);
    }
    catch (Exception e)
    {
        throw;
    }
}

[HttpGet]
public List<TestDataEntity> GetAll()
{
    try
    {
        IRepository repo = GetRepository<TestDataRepository>();
        return repo.GetMany();
    }
    catch (Exception e)
    {
        throw;
    }
}

[HttpPost]
public void Update(TestDataEntity entity)
{
    try
    {
        IRepository repo = GetRepository<TestDataRepository>();
        repo.Update(entity);
    }
    catch (Exception e)
    {
        throw;
    }
}
}
When I run this
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.

AnswerRe: Asp.Net Core Web API Pin
Richard Deeming16-Jul-20 0:29
mveRichard Deeming16-Jul-20 0:29 
Questionnot close sqlitedb in php is ok? Pin
Member 144909644-Jul-20 22:05
MemberMember 144909644-Jul-20 22:05 
AnswerRe: not close sqlitedb in php is ok? Pin
Richard MacCutchan4-Jul-20 22:11
mveRichard MacCutchan4-Jul-20 22:11 
GeneralRe: not close sqlitedb in php is ok? Pin
Member 144909644-Jul-20 22:16
MemberMember 144909644-Jul-20 22:16 
GeneralRe: not close sqlitedb in php is ok? Pin
Richard MacCutchan4-Jul-20 22:44
mveRichard MacCutchan4-Jul-20 22:44 
Questionweb development: php, MSQLI Pin
baalfire4-Jul-20 2:16
Memberbaalfire4-Jul-20 2:16 
AnswerRe: web development: php, MSQLI Pin
Richard MacCutchan4-Jul-20 4:36
mveRichard MacCutchan4-Jul-20 4:36 
AnswerRe: web development: php, MSQLI Pin
ellegonzalez26-Dec-20 6:45
Memberellegonzalez26-Dec-20 6:45 
Questionrestore real ip to access.log of xampp apache server registered in cloudflare Pin
Member 144909643-Jul-20 22:12
MemberMember 144909643-Jul-20 22:12 
Questionwhat would you recommend me to use graphs in PHP+MySQL? Pin
Joan M18-Jun-20 10:49
professionalJoan M18-Jun-20 10:49 
Questionnode js express redirect from http to https Pin
Oscar K.13-Jun-20 2:45
MemberOscar K.13-Jun-20 2:45 
QuestionPlotting points on interactive map Pin
StampedePress9-Jun-20 6:07
MemberStampedePress9-Jun-20 6:07 
AnswerRe: Plotting points on interactive map Pin
Saim Irfan2-Jul-20 8:58
MemberSaim Irfan2-Jul-20 8:58 
Questionweb development Pin
moustafa arabi6-Jun-20 4:39
Membermoustafa arabi6-Jun-20 4:39 
AnswerRe: web development Pin
Mycroft Holmes6-Jun-20 13:07
professionalMycroft Holmes6-Jun-20 13:07 
QuestionHow to successfully Async download a pdf file to a client PC vb.net web application Pin
Amer Amer5-Jun-20 23:47
MemberAmer Amer5-Jun-20 23:47 
AnswerRe: How to successfully Async download a pdf file to a client PC vb.net web application Pin
F-ES Sitecore6-Jun-20 3:40
mveF-ES Sitecore6-Jun-20 3:40 

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.