public bool Create(AssociateDto associateDto) { try { _context.Associate.Add(new Associate() { Agreement = new Agreement() { Description = associateDto.Agreement.Description, DiscountAmount = associateDto.Agreement.DiscountAmount, DiscountPercentage = associateDto.Agreement.DiscountPercentage }, Customer = new Customer() { Name = associateDto.Customer.Name, Document = associateDto.Customer.Document, LegalEntity = associateDto.Customer.LegalEntity }, Quantity = associateDto.Quantity }); _context.SaveChanges(); return(true); } catch { return(false); } }
public bool Update(AssociateDto associateDto) { throw new NotImplementedException(); }