Ejemplo n.º 1
0
 public static calendar_profile insert(calendar_entity db,byte[] img, Guid uid)
 {
     calendar_profile newp = new calendar_profile { userid = uid, img = img };
     db.calendar_profile.AddObject(newp);
     db.SaveChanges();
     return newp;
 }
Ejemplo n.º 2
0
 public static void update(calendar_entity db, calendar_profile newp)
 {
     calendar_profile p = (from i in db.calendar_profile
                           where i.userid == newp.userid
                           select i).First();
     p.sex = newp.sex;
     p.name = newp.name;
     p.Favorate = newp.Favorate;
     p.Dislike = newp.Dislike;
     db.SaveChanges();
 }