public static bool CreateSectorCompanyScopeIsValid(this SectorCompany sector) { return(AssertionConcern.IsSatisfiedBy ( AssertionConcern.AssertNotEmpty(sector.Sector, "O setor é obrigatório") )); }
public static bool UpdateSectorCompanyScopeIsValid(this SectorCompany sector, UpdateSectorCompanyCommand command) { return(AssertionConcern.IsSatisfiedBy ( AssertionConcern.AssertNotEmpty(command.Sector, "O setor é obrigatório") )); }
public SectorCompany Create(CreateSectorCompanyCommand command) { var sector = new SectorCompany(command.Sector); sector.Create(); _repository.Create(sector); if (Commit()) { return(sector); } return(null); }
public void Delete(SectorCompany sector) { throw new NotImplementedException(); }
public void Update(SectorCompany sector) { _context.Entry <SectorCompany>(sector).State = System.Data.Entity.EntityState.Modified; }
public void Create(SectorCompany sector) { _context.SectorCompany.Add(sector); }