コード例 #1
0
        public void UpdateActor(Model.Actor actor, int actorId)
        {
            var dbActor = context.Actors.Find(actorId);

            dbActor.last_name  = actor.LastName;
            dbActor.first_name = actor.FirstName;

            context.SaveChanges();
        }
コード例 #2
0
 public void AddActor(Model.Actor actor)
 {
     context.Actors.Add(new Table.Actor
     {
         first_name = actor.FirstName,
         last_name  = actor.LastName
     });
     context.SaveChanges();
 }