public static string UpdateProjectMetadata(ProjectMetadataModel meta, string connstring) { try { Dictionary <string, object> spParams = new Dictionary <string, object>(); spParams.Add("@Id", meta.ProjectId); spParams.Add("@Impact", meta.Impact); spParams.Add("@WebsitePicture", meta.WebsitePicture); spParams.Add("@Caption", meta.Caption); spParams.Add("@Latitude", meta.Latitude); spParams.Add("@Longitude", meta.Longitude); spParams.Add("@LastUpdatedBy", meta.LastUpdatedBy); return(DBAccess.ExecuteSQLNonQuery(connstring, "CALL usp_UpdateProjectMetadata(@Id, @Impact, @WebsitePicture, @Caption," + "@Latitude, @Longitude, @LastUpdatedBy)", spParams)); } catch (Exception) { return("An error occurred"); } }
public string PutMetadata([FromRoute] int id, [FromBody] ProjectMetadataModel projectMeta) { projectMeta.ProjectId = id; return(ProjectService.UpdateProjectMetadata(projectMeta, dbConn)); }