# -*- coding: gbk -*- def uniq(ls): lsCopy=[e for e in ls] for i in xrange(1,len(ls)): for j in xrange(i): if ls[j]!=ls[i]: pass else: lsCopy.remove(ls[i])#如果有removeAt(index)方法更好 return lsCopy if __name__=='__main__': ls=[1,2,3,4,5,6,7,8,9,7,2,3,6] p…
ActionUrl c = new ActionUrl() { ActionName="test", RequestUrl="/123/123", SubTime=DateTime.Now }; //增 using (EntityContext db = new EntityContext()) { /*方法1*/ db.ActionUrls.Add(c); db.SaveChanges(); /*方法2*/ db.Set<ActionUrl>().At…