示例#1
0
        //Function to delete FirstName
        protected virtual OperationResult _DeleteByFirstName(string firstName)
        {
            //Create repository based on its Key name : 'Keywords.DeleteUserInfo'.
            //The repository factory will create the repository object based on its key.
            IDeleteUserInfoRepository repository = (IDeleteUserInfoRepository)RepositoryFactory.Create(Keywords.DeleteUserInfo);

            try
            {
                //Execute DeleteByFirstName
                repository.DeleteByFirstName(firstName);
                return(new OperationResult(true, null));
            }
            catch (Exception e)
            {
                return(new OperationResult(false, e));
            }
        }
示例#2
0
        //Function to delete
        protected virtual OperationResult _DeleteByGenderIdAndCityId(Int16 genderId, Int16 cityId)
        {
            //Create repository based on its Key name : 'Keywords.DeleteUserInfo'.
            //The repository factory will create the repository object based on its key.
            IDeleteUserInfoRepository repository = (IDeleteUserInfoRepository)RepositoryFactory.Create(Keywords.DeleteUserInfo);

            try
            {
                //Execute DeleteByGenderIdAndCityId
                repository.DeleteByGenderIdAndCityId(genderId, cityId);
                return(new OperationResult(true, null));
            }
            catch (Exception e)
            {
                return(new OperationResult(false, e));
            }
        }