示例#1
0
        internal void RemoveFoodSpecialDate(Guid?foodid, specialdate sd)
        {
            food food = db.food.Find(foodid);

            food.specialdate.Remove(sd);
            db.SaveChanges();
        }
示例#2
0
        internal specialdate CreateSpecialDate(string dateStr)
        {
            specialdate sd = new specialdate()
            {
                id   = Guid.NewGuid(),
                date = dateStr
            };

            db.specialdate.Add(sd);
            db.SaveChanges();
            return(sd);
        }