croller
using System;
using System.Collections.Generic;using System.Linq;using System.Net;using System.Net.Http;using System.Web.Http;namespace LC.WebApi.Controllers
{ using Entity; using BLL; [RoutePrefix("LiChen")] public class AddressesApiController : ApiController { AddressesBLL bll = new AddressesBLL();/// <summary>
/// 新增 /// </summary> /// <param name="a"></param> /// <returns></returns> [HttpPost] [Route("Add")] public int Add(Addresses a) { var result = bll.Add(a); return result; }/// <summary>
/// 修改 /// </summary> /// <param name="a"></param> /// <returns></returns> [HttpPost] [Route("Update")] public int Update(Addresses a) { var result = bll.Update(a); return result; }/// <summary>
/// 删除 /// </summary> /// <param name="Id"></param> /// <returns></returns> [HttpPost] [Route("Delete")] public int Delete(int Id) { var result = bll.Delete(Id); return result; }/// <summary>
/// 根据Id获取 /// </summary> /// <param name="Id"></param> /// <returns></returns> [HttpPost] [Route("QueryById")] public Addresses QueryById(int Id) { var result = bll.QueryById(Id); return result; }/// <summary>
/// 获取数据 /// </summary> /// <returns></returns> [HttpPost] [Route("Query")] public List<Addresses> Query() { var result = bll.Query(); return result; }/// <summary>
/// 获取数据 /// </summary> /// <returns></returns> [HttpPost] [Route("GetRegion")] public List<Region> GetRegion(int PId) { var result = bll.GetRegion(PId); return result; } }}