wcf的基本结构

对象:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;

namespace test.Dto
{
    /// <summary>
    /// 用户来源
    /// </summary>
    public enum UserSource
    {
        /// <summary>
        /// 自由注册
        /// </summary>
        [DescriptionAttribute("自由注册")]
        FreeReg,
        /// <summary>
        /// QQ
        /// </summary>
        [DescriptionAttribute("QQ")]
        QQ,
        /// <summary>
        /// 新浪微博
        /// </summary>
        [DescriptionAttribute("新浪微博")]
        Sina,
        /// <summary>
        /// 增值用户
        /// </summary>
        [DescriptionAttribute("增值用户")]
        ZengZhi
    }
    /// <summary>
    /// 用户类型
    /// </summary>
    public enum UserType
    {
        /// <summary>
        /// 买家
        /// </summary>
        [DescriptionAttribute("买家")]
        BUYER = 0,
        /// <summary>
        /// 卖家
        /// </summary>
        [DescriptionAttribute("卖家")]
        SELLER = 1
    }
 
    /// <summary>
    /// 用户注册
    /// </summary>
    [DataContract]
    public class UserRegDto
    {
        /// <summary>
        /// 注册方式 0自由注册 1QQ 2新浪微博 
        /// </summary>
        [DataMember]
        public int RegType { get; set; }
        /// <summary>
        /// 登录账号
        /// </summary>
        [DataMember]
        public LoginDto Login { get; set; }
        /// <summary>
        /// 密码
        /// </summary>
        [DataMember]
        public string Pwd { get; set; }
        /// <summary>
        /// 昵称
        /// </summary>
        [DataMember]
        public string NickName { get; set; }
        /// <summary>
        /// 电话
        /// </summary>
        [DataMember]
        public string Phone { get; set; }
        /// <summary>
        /// 邮箱
        /// </summary>
        [DataMember]
        public string Email { get; set; }
        /// <summary>
        /// 用户来源
        /// </summary>
        [DataMember]
        public string Source { get; set; }
        /// <summary>
        /// 性别 0未知1男2女
        /// </summary>
        [DataMember]
        public int Gender { get; set; }
    }
    
}
接口
<pre name="code" class="csharp">using EnYuan.BSS.Area.Dto;
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Text;
using System.Threading.Tasks;

namespace test.areas
{
    [ServiceContract]
    public interface IAreaService
    {
        /// <summary>
        /// 获取省份列表
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        List<AreaDto> ListProvince();

        /// <summary>
        /// 获取城市列表
        /// </summary>
        /// <param name="province"></param>
        /// <returns></returns>
        [OperationContract]
        List<AreaDto> ListCity(string province);
        /// <summary>
        /// 按拼音获取城市列表
        /// </summary>
        /// <param name="py"></param>
        /// <returns></returns>
        [OperationContract]
        List<AreaDto> ListCityByPY(string py);
        /// <summary>
        /// 获取地区列表
        /// </summary>
        /// <param name="province"></param>
        /// <param name="city"></param>
        /// <returns></returns>
        [OperationContract]
        List<AreaDto> ListArea(string province, string city);
        /// <summary>
        /// 按名称查询地区详情
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        [OperationContract]
        AreaDto GetArea(string name);

        /// <summary>
        /// 农历转公历日期
        /// </summary>
        /// <param name="year"></param>
        /// <param name="month"></param>
        /// <param name="day"></param>
        /// <returns></returns>
        [OperationContract]
        DateTime GetChinaCalendar(DateTime dt); 
    }
}

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Bingo_BIG

你的鼓励是我最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值