Ejemplo n.º 1
0
 /// <summary>
 /// removes a record from the database
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="Obj"></param>
 /// <returns></returns>
 public virtual async Task Delete <T>(T Obj)
 {
     try
     {
         this.Query = DBISamHelper.GenerateDeleteStatement(Obj);
         await ExecuteNonQuery();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 2
0
            /// <summary>
            /// Updates a record in the database
            /// </summary>
            /// <typeparam name="T"></typeparam>
            /// <param name="obj"></param>
            /// <returns></returns>

            public virtual async Task Update <T>(T obj)
            {
                try
                {
                    this.Query = DBISamHelper.GenerateUpdateStatment <T>(obj);
                    await ExecuteNonQuery();
                }
                catch (Exception ex)
                {
                    throw ex;
                }
            }
Ejemplo n.º 3
0
            /// <summary>
            /// Creates a record in the database
            /// </summary>
            /// <typeparam name="T"></typeparam>
            /// <param name="Obj"></param>
            /// <returns></returns>

            public virtual async Task <int> Create <T>(T Obj)
            {
                try
                {
                    this.Query = DBISamHelper.GenerateInsertStatment(Obj);
                    return(await ExecuteNonQuery());
                }
                catch (Exception ex)
                {
                    throw ex;
                }
            }