Ejemplo n.º 1
0
        public void AddLog(Log log)
        {
            var timeLoggingContext = new TimeLoggingContext();

            timeLoggingContext.Logs.Add(log);
            timeLoggingContext.SaveChanges();
        }
Ejemplo n.º 2
0
        public static void SubmitTimeLog(TimeLogViewModel log)
        {
            var timeLoggingContext = new TimeLoggingContext();
            var newEntry = new Log()
            {
                Billable = log.Billable,
                Comment = log.Comment,
                EndTime = log.EndTime,
                StartTime = log.StartTime,
                UserId = "doug"
            };

            timeLoggingContext.Logs.Add(newEntry);
            timeLoggingContext.SaveChanges();
        }