Esempio n. 1
0
        // Add your own data access methods here.  If you wish to
        // expose your public method to a WCF service, marked them with
        // the attribute [NCPublish], and another T4 template will generate your service contract

        /// <summary>
        /// This method adds new managed account program for Asset Manager
        /// </summary>
        /// <param name="program"></param>
        /// <returns></returns>
        public bool AddNewManagedAccount(ManagedAccountProgram program)
        {
            try
            {
                using (var unitOfWork = new EFUnitOfWork())
                {
                    var accProgramRepo =
                        new ManagedAccountProgramRepository(new EFRepository <ManagedAccountProgram>(), unitOfWork);

                    accProgramRepo.Add(program);
                    accProgramRepo.Save();
                    return(true);
                }
            }
            catch (Exception ex)
            {
                CommonErrorLogger.CommonErrorLog(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
                return(false);
            }
        }
Esempio n. 2
0
 public void Delete(ManagedAccountProgram entity)
 {
     Repository.Delete(entity);
 }
Esempio n. 3
0
 public void Add(ManagedAccountProgram entity)
 {
     Repository.Add(entity);
 }