public virtual async Task <int> CreateContact(CreateCompanyOrContact input) { var id = 0; int TenantId = (int)(AbpSession.TenantId); CreateContact contact = new CreateContact(); contact.Name = input.Name; contact.CustomerTypeId = input.CustomerTypeId; contact.CompanyId = input.CompanyId; contact.LastName = input.LastName; contact.TitleId = input.TitleId; contact.TenantId = TenantId; var contacts = contact.MapTo <Contact>(); id = _NewContactRepository.InsertAndGetId(contacts); return(id); }
public virtual async Task <int> CreateContact(CreateCompanyOrContact input) { var id = 0; CreateContact contact = new CreateContact() { Name = input.Name, NewCustomerTypeId = input.NewCustomerTypeId ?? null, NewCompanyId = input.NewCompanyId ?? null, LastName = input.LastName, TitleId = input.TitleId ?? null, DesignationId = input.DesignationId ?? null }; var contacts = contact.MapTo <NewContact>(); id = _NewContactRepository.InsertAndGetId(contacts); return(id); }