/// <summary> /// Contact Bank Account Upd /// </summary> public static async Task <ContactBankAccountEntity> ContactBankAccountUpd(ContactBankAccountEntity item, string userGuid, string serviceGroupGuid) { try { var pixMakeRepository = await PixMakeMySqlRepository.GetConnection(); var result = await pixMakeRepository.QueryFirstOrDefaultAsync <ContactBankAccountEntity>( "pm_contact_bank_account_upd", new { contact_bank_account_guid_in = item.contact_bank_account_guid, contact_guid_in = item.contact_guid, service_group_guid_in = serviceGroupGuid, user_guid_in = userGuid, contact_bank_account_info_in = item.contact_bank_account_info }, commandType : CommandType.StoredProcedure); pixMakeRepository.Close(); return(result); } catch (Exception ex) { await SendError.SendErrorAsync(ex, customMessage : "MySql"); return(null); } }
/// <summary> /// Contact Bank Account Upd /// </summary> public async Task <IEnumerable <ContactBankAccountDto> > ContactBankAccountUpd(List <ContactBankAccountDto> dtoItems, string userGuid, string serviceGroupGuid) { foreach (var dtoItem in dtoItems) { var item = new ContactBankAccountEntity { contact_bank_account_guid = dtoItem.contact_bank_account_guid, contact_guid = dtoItem.contact_guid, contact_bank_account_info = JsonDataExtensions.EntityToJsonData(dtoItem) }; await ContactInfo.ContactBankAccountUpd(item, userGuid, serviceGroupGuid); } var result = await ContactBankAccountGet(null, dtoItems.Select(c => c.contact_guid).FirstOrDefault(), serviceGroupGuid); return(result); }