예제 #1
0
        public async Task <PartialTemplate> Create(PartialTemplate template)
        {
            var dbPartial = template.AsEntity();
            await _store.Partials.AddAsync(dbPartial).ConfigureAwait(false);

            await _store.SaveChangesAsync().ConfigureAwait(false);

            return(dbPartial.AsDomain());
        }
예제 #2
0
        public async Task <Category> Create(Category template)
        {
            var dbCategory = template.AsEntity();
            await _store.Categories.AddAsync(dbCategory);

            await _store.SaveChangesAsync().ConfigureAwait(false);

            return(dbCategory.AsDomain());
        }