public static void PutUserItem(UsersItem item) { try { Utils.search_db.Table <UsersItem>().Save(item); } catch (Exception e) { Log.LogInfo(e.Message, e, "error while putting to search index"); } }
public static void PutUserItem(UsersItem item) { try { JavaScriptSerializer ser = new JavaScriptSerializer(); ser.MaxJsonLength = Int32.MaxValue; string data = ser.Serialize(item); using (var client = new WebClient()) { client.Encoding = Encoding.UTF8; client.UploadString(TopSecret.ElasticUrl + item.UserId + "/" + item.ID, "PUT", data); } } catch (Exception e) { Log.LogInfo(e.Message, "error while putting to search index"); } }
public static void PutUserItem(UsersItem item) { try { Utils.search_db.Table<UsersItem>().Save(item); } catch (Exception e) { Log.LogInfo(e.Message, e, "error while putting to search index"); } }