private static Protocol CreateFromFilter(IQueryFilter filter, Database database = null) { Database db = database ?? Db.For <Protocol>(); var dao = new Protocol(); filter.Parameters.Each(p => { dao.Property(p.ColumnName, p.Value); }); dao.Save(db); return(dao); }
private static Protocol GetProtocol(Uri uri) { Protocol proto = Protocol.OneWhere(c => c.Value == uri.Scheme); if (proto == null) { proto = new Protocol(); proto.Value = uri.Scheme; proto.Save(); } return(proto); }
public ActionResult Update(Bam.Net.Analytics.Protocol dao) { try { dao.Save(); return(Json(new { Success = true, Message = "", Dao = dao.ToJsonSafe() })); } catch (Exception ex) { return(GetErrorResult(ex)); } }