The action method: 1. Parameter as string public HttpResponseMessage AddText(string jobNo,[FromBody] string text) { .... } test action: 2. Parameter as Custom Object public class AddScheduleNote { public string JobNo { get; set; } public string ScheduleNote { get; set; } } ................... public HttpResponseMessage UpdateScheduleNote([FromBody] AddScheduleNote note) { try { JobSchedule job = db.JobSchedules.Where(r => r.Job_No.Equals(note.JobNo, StringComparison.OrdinalIgnoreCase)).SingleOrDefault(); if (job == null) { ...
Comments
Post a Comment