Beispiel #1
0
        public async Task <PublicDummy> UpdateAsync(string correlationId, PublicDummy entity)
        {
            var request = new DummyObjectRequest
            {
                CorrelationId = correlationId,
                Dummy         = ConvertFromPublic(entity)
            };

            var item = await CallAsync <DummyObjectRequest, ProtoDummy>("update_dummy", request);

            return(ConvertToPublic(item));
        }
Beispiel #2
0
 private static ProtoDummy ConvertFromPublic(PublicDummy dummy)
 {
     if (dummy == null)
     {
         return(null);
     }
     return(new ProtoDummy
     {
         Id = dummy.Id,
         Key = dummy.Key,
         Content = dummy.Content
     });
 }