public Add ( BolfTracker.Models.Shot shot ) : void | ||
shot | BolfTracker.Models.Shot | |
return | void |
public void Add(Shot shot)
{
using (var context = new BolfTrackerContext())
{
context.Shots.Attach(shot);
context.Entry(shot).State = EntityState.Added;
context.SaveChanges();
}
}