Exemplo n.º 1
0
        public async Task <MainCategoryServiceModel> CreateAsync(MainCategoryServiceModel serviceModel)
        {
            MainCategory mainCategory = serviceModel.To <MainCategory>();

            await this.context.MainCategories.AddAsync(mainCategory);

            await this.context.SaveChangesAsync();

            return(serviceModel);
        }