Пример #1
0
 public async Task<Menu> UpdateMenu(Menu menu)
 {
     var entityMenu = _mapper.Map<Menu, Domain.Entities.DocumentDb.Menu>(menu);
     var response = await _documentStore.ReplaceDocument(entityMenu);
     var updatedMenu = (Domain.Entities.DocumentDb.Menu)(dynamic)response.Resource;
     var mappedUpdatedMenu = _mapper.Map<Domain.Entities.DocumentDb.Menu, Menu>(updatedMenu);
     return mappedUpdatedMenu;
 }
Пример #2
0
        public async Task <Menu> UpdateMenu(Menu menu)
        {
            var entityMenu = _mapper.Map <Menu, Domain.Entities.DocumentDb.Menu>(menu);
            var response   = await _documentStore.ReplaceDocument(entityMenu);

            var updatedMenu       = (Domain.Entities.DocumentDb.Menu)(dynamic) response.Resource;
            var mappedUpdatedMenu = _mapper.Map <Domain.Entities.DocumentDb.Menu, Menu>(updatedMenu);

            return(mappedUpdatedMenu);
        }
Пример #3
0
 public async Task AddMenu(Menu menu)
 {
     var entityMenu = _mapper.Map <Menu, Domain.Entities.DocumentDb.Menu>(menu);
     await _documentStore.UpsertDocumentIfNotExists(menu.Id.ToString(), entityMenu);
 }
Пример #4
0
 public async Task AddMenu(Menu menu)
 {
     var entityMenu = _mapper.Map<Menu, Domain.Entities.DocumentDb.Menu>(menu);
     await _documentStore.UpsertDocumentIfNotExists(menu.Id.ToString(), entityMenu);
 }