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; }
public void Delete(Category category) { _context.Categories.Remove(category); }
public void Update(Category category) { _context.Entry<Category>(category).State = EntityState.Modified; }
public void Create(Category category) { _context.Categories.Add(category); }