public Task <object> InsertAsync(SmtpModel model) { if (model == null) { throw new ArgumentNullException("Smtp ArgumentNullException Insert Async"); } Smtp dto = AutoMapperGenericHelper <SmtpModel, Smtp> .Convert(model); var id = _smtpRepository.Insert(dto); return(Task.FromResult <object>(id)); }