public static bool FromDBTable(this CampaignData item, DataRow row) { if (row == null) { return(false); } row.Copy(item); return(true); }
public static async Task <bool> FromDBAsync(this CampaignData item, DBKey campaignId) { var query = new DBQuery_Campaign_Select(); query.IN.DBKey = campaignId; await DBThread.Instance.ReqQueryAsync(query); if (query.OUT.FirstItem == null) { return(false); } query.OUT.FirstItem.Copy(item); return(true); }