public async Task<FdpSpecialFeatureMapping> CopyFdpSpecialFeatureMappingToDocument(FdpSpecialFeatureMapping fdpSpecialFeatureMapping, int targetDocumentId)
 {
     return await Task.FromResult(_featureDataStore.FdpSpecialFeatureMappingCopy(fdpSpecialFeatureMapping, targetDocumentId));
 }
        public FdpSpecialFeatureMapping FdpSpecialFeatureMappingDelete(FdpSpecialFeatureMapping featureMappingToDelete)
        {
            FdpSpecialFeatureMapping retVal = new EmptyFdpSpecialFeatureMapping();
            using (IDbConnection conn = DbHelper.GetDBConnection())
            {
                try
                {
                    var para = new DynamicParameters();
                    para.Add("@FdpSpecialFeatureMappingId", featureMappingToDelete.FdpSpecialFeatureMappingId, DbType.Int32);
                    para.Add("@CDSId", CurrentCDSID, DbType.String);

                    var results = conn.Query<FdpSpecialFeatureMapping>("Fdp_SpecialFeatureMapping_Delete", para, commandType: CommandType.StoredProcedure);
                    if (results.Any())
                    {
                        retVal = results.First();
                    }
                }
                catch (Exception ex)
                {
                    Log.Error(ex);
                    throw;
                }
            }
            return retVal;
        }
 public async Task<FdpSpecialFeatureMapping> DeleteFdpSpecialFeatureMapping(FdpSpecialFeatureMapping featureMappingToDelete)
 {
     return await Task.FromResult(_featureDataStore.FdpSpecialFeatureMappingDelete(featureMappingToDelete));
 }
        public FdpSpecialFeatureMapping FdpSpecialFeatureMappingCopy(FdpSpecialFeatureMapping featureMappingToCopy, int targetDocumentId)
        {
            FdpSpecialFeatureMapping retVal = new EmptyFdpSpecialFeatureMapping();
            using (IDbConnection conn = DbHelper.GetDBConnection())
            {
                try
                {
                    var para = new DynamicParameters();

                    para.Add("@FdpSpecialFeatureMappingId", featureMappingToCopy.FdpSpecialFeatureMappingId, DbType.Int32);
                    para.Add("@TargetDocumentId", targetDocumentId, DbType.Int32);
                    para.Add("@CDSId", CurrentCDSID, DbType.String);

                    var rows = conn.Execute("Fdp_SpecialFeatureMapping_Copy", para, commandType: CommandType.StoredProcedure);

                    retVal = FdpSpecialFeatureMappingGet(new SpecialFeatureMappingFilter { SpecialFeatureMappingId = featureMappingToCopy.FdpSpecialFeatureMappingId });
                }
                catch (Exception ex)
                {
                    Log.Error(ex);
                    throw;
                }
            }
            return retVal;
        }