public Goals AddGoal(int disciplineId, short periodDays, double value, string description, int ownerId)
 {
     try
     {
         var g = new Goals();
         g.Description = description;
         g.DisciplineId = disciplineId;
         g.PeriodDays = periodDays;
         g.Value = value;
         g.OwnerId = ownerId;
         db.Goals.InsertOnSubmit(g);
         db.SubmitChanges();
         return g;
     }
     catch (Exception e)
     {
         return null;
     }
 }
 partial void UpdateGoals(Goals instance);
 partial void DeleteGoals(Goals instance);
 partial void InsertGoals(Goals instance);
		private void detach_Goals(Goals entity)
		{
			this.SendPropertyChanging();
			entity.Users = null;
		}
		private void attach_Goals(Goals entity)
		{
			this.SendPropertyChanging();
			entity.Users = this;
		}
		private void detach_Goals(Goals entity)
		{
			this.SendPropertyChanging();
			entity.Discipline = null;
		}
		private void attach_Goals(Goals entity)
		{
			this.SendPropertyChanging();
			entity.Discipline = this;
		}