예제 #1
0
        public NGOModel Post([FromBody] NGOModel ngo)
        {
            Response.StatusCode = 201;
            string result = NGOService.CreateNGO(ngo, dbConn);

            ngo.Id = Convert.ToInt32(result);
            return(ngo);
        }
예제 #2
0
 public string UpdateNGO([FromRoute] int id, [FromBody] NGOModel ngo)
 {
     return(NGOService.UpdateNGO(ngo, dbConn));
 }
예제 #3
0
 public string DeleteNGO([FromRoute] int id)
 {
     return(NGOService.DeleteNGO(id, dbConn));
 }
예제 #4
0
 public NGOModel GetNGO([FromRoute] int id)
 {
     return(NGOService.GetNGO(id, dbConn));
 }
예제 #5
0
 public List <NGOModel> Get()
 {
     return(NGOService.GetAllNGOs(dbConn));
 }