Exemplo n.º 1
0
        public void TestMethod1()
        {
            var category = new Category("Placa Mãe");
            var product = new Product();

            category.Title = "";

            // Salvar Categoria
        }
        public Category Create(CreateCategoryCommand command)
        {
            var category = new Category(command.Title);
            category.Register();
            _repository.Create(category);

            if (Commit())
                return category;

            return null;
        }
Exemplo n.º 3
0
 public void Delete(Category category)
 {
     _context.Categories.Remove(category);
 }
Exemplo n.º 4
0
 public void Update(Category category)
 {
     _context.Entry<Category>(category).State = EntityState.Modified;
 }
Exemplo n.º 5
0
 public void Create(Category category)
 {
     _context.Categories.Add(category);
 }