コード例 #1
0
		private void detach_Disabilities(Disability entity)
		{
			this.SendPropertyChanging();
			entity.Account = null;
		}
コード例 #2
0
 partial void DeleteDisability(Disability instance);
コード例 #3
0
 partial void InsertDisability(Disability instance);
コード例 #4
0
 partial void UpdateDisability(Disability instance);
コード例 #5
0
    public bool presist(DisabilityDTO entity)
    {
        try
        {
            model.Disability obj = new Disability();
            obj.userName = entity.userName;
            obj.disabilityType = entity.disabilityType;
            obj.description = entity.description;

            ctx.Disabilities.InsertOnSubmit(obj);
            ctx.SubmitChanges();
            return true;
        }
        catch (Exception)
        {
            ctx.Dispose();
            ctx = new ModelDataContext();
            return false;
        }
    }