Example #1
0
 public RpcResponse <bool> UpdateData(TestModelDto model)
 {
     return(RpcCommHelper.GetReponse <bool>(() =>
     {
         return TestDateHelper.UpdateData();
     }));
 }
Example #2
0
 public RpcResponse <bool> AddData(TestModelDto model)
 {
     return(RpcCommHelper.GetReponse <bool>(() =>
     {
         return TestDateHelper.AddDataByModel(model).Id > 0;
     }));
 }
Example #3
0
 public RpcResponse <bool> DeleteData(int id)
 {
     return(RpcCommHelper.GetReponse <bool>(() =>
     {
         return TestDateHelper.DeleteData();
     }));
 }
Example #4
0
 private static void InitRpcService()
 {
     ///启动RPC服务字典,对外提供服务
     Hsf.NetCore.Rpc.Service.RpcProcessHelper.StartRpcService();
     TestDateHelper.RegisterMaps();///注册AutoMaper全局的Dto\Dao映射关系,全局只注册一次
 }
Example #5
0
 public RpcResponse <List <TestModelDto> > GetDataList(int pageIndex, int pageSize)
 {
     return(RpcCommHelper.GetReponse <List <TestModelDto> >(() => {
         return TestDateHelper.GetListByPage(pageIndex, pageSize);
     }));
 }