예제 #1
0
 /// <summary>
 /// Create a new CalendarDay object.
 /// </summary>
 /// <param name="calDay">Initial value of the CalDay property.</param>
 public static CalendarDay CreateCalendarDay(global::System.DateTime calDay)
 {
     CalendarDay calendarDay = new CalendarDay();
     calendarDay.CalDay = calDay;
     return calendarDay;
 }
예제 #2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the CalendarDays EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToCalendarDays(CalendarDay calendarDay)
 {
     base.AddObject("CalendarDays", calendarDay);
 }
예제 #3
0
        static void daty()
        {
            using (PrdnEntities ctx = new PrdnEntities())
            {
                var q = from p in ctx.CalendarDays
                        orderby p.CalDay
                        select p;

                ObjectQuery oq = (ObjectQuery)q;
                string s = oq.ToTraceString();
                Console.WriteLine(s);
                Console.ReadLine();

                CalendarDay c = new CalendarDay();
                c.CalDay = DateTime.Today;
                ctx.CalendarDays.AddObject(c);
                ctx.SaveChanges();
            }
        }