ITimeU.Models.AthleteClassModel.Delete C# (CSharp) Method

Delete() public method

public Delete ( ) : void
return void
        public void Delete()
        {
            using (var context = new Entities())
            {
                var model = context.AthleteClasses.Where(athleteclass => athleteclass.ID == Id).Single();
                context.DeleteObject(model);
                context.SaveChanges();
            }
        }