Пример #1
0
        /*
         * public decimal Id { get; set; }
         * public Nullable<System.DateTime> date { get; set; }
         * public string page { get; set; }*/

        public static void SaveVisitToDB(string url)
        {
            using (CrystalSiegeEntities contents = new CrystalSiegeEntities())
            {
                try
                {
                    Visit vis = new Visit
                    {
                        date = DateTime.Now,
                        page = url
                    };
                    contents.Visit.Add(vis);
                    contents.SaveChanges();
                }
                catch (Exception ex)
                {
                }
            }
        }