# appapi/appfollower (信眾管理) ```C# [RoutePrefix("api/appfollower")] public class appFollowerController : ApiController ``` ## Get() ### 介面 ``` C# public IEnumerable Get() ``` 取得所有信眾資料列表 ### 傳回 ``` C# IEnumerable ``` ### 介面 ``` C# public IEnumerable Get (int page, int pageSize = 10, string sortBy="", bool sortDesc=false) ``` 取得指定分頁信眾資料列表 ### 傳回 ``` C# IEnumerable ``` ### 介面 ``` C# // GET appapi//5 public Model.follower Get(int id) ``` 依ID取得指定單筆信眾 ### 傳回 ``` C# Model.follower ``` ## Post() ### 介面 ``` C# // POST appapi/ public void Post([FromBody] Model.follower item) ``` 新增信眾 ### 傳回 ``` C# ``` ## Put() ### 介面 ``` C# // PUT appapi//5 public void Put(int id, [FromBody] Model.follower item) ``` 修改信眾 ### 傳回 ``` C# ``` ## Delete() ### 介面 ``` C# // DELETE appapi//5 public void Delete(int id) ``` 刪除指定ID信眾 ### 傳回 ``` C# ``` ## [HttpDelete] api/appfollower/Delete/{nums} ### 介面 ``` C# [HttpDelete] [Route("api/appfollower/Delete/{nums}")] public void Delete(string nums) ``` 刪除指定信眾編號信眾 ### 傳回 ``` C# ``` ## [HttpGet] api/appfollower/count ### 介面 ``` C# [HttpGet] [Route("api/appfollower/count")] public int Count() ``` 傳回筆數 ### 傳回 ``` C# int ``` ## [HttpPost] api/appfollower/GetList ### 介面 ``` C# [HttpPost] [Route("api/appfollower/GetList")] public IHttpActionResult GetList( [FromBody] Model.ViewModel.follower q, int page, int pageSize = 10, string sortBy = "", bool sortDesc = false) ``` 對信眾資料:分頁查詢, 排序, 傳回列表 ### 傳回 ``` C# { list = IEnumerable, //分頁列表 count = int //筆數 } ``` ## [HttpPost] api/appfollower/GetTabletList ### 介面 ``` C# [HttpPost] [Route("api/appfollower/GetTabletList")] public IHttpActionResult GetTabletList([FromBody] Model.follower q, int page, int pageSize = 10, string sortBy = "", bool sortDesc = false) ``` 取得牌位資訊 ### 傳回 ``` C# List of: new { id = i++, num = x.num, f_num = x.f_num, type = x.type, //型式 title = x.title, //標題 }) ``` ## [HttpPost] api/appfollower/tabletSave ### 介面 ``` C# [HttpPost] [Route("api/appfollower/tabletSave")] public IHttpActionResult tabletSave([FromBody] Model.ViewModel.followers_tablet item) ``` 儲存牌位資訊 ### 傳回 ``` C# int //牌位編號 ``` ## [HttpDelete] api/appfollower/tabletDelete/{id} ### 介面 ``` C# [HttpDelete] [Route("api/appfollower/tabletDelete/{id}")] public void tabletDelete(int id) ``` 刪除牌位資訊 ### 傳回 ``` C# ```