Ejemplo n.º 1
0
 /// <inheritdoc />
 public string GetDbParameterName(IDbDataEntity data)
 {
     if (!string.IsNullOrWhiteSpace(data.Schema))
     {
         return(string.Format("@{0}_{1}", data.Schema, data.Name));
     }
     else
     {
         return(string.Format("@{0}", data.Name));
     }
 }
        public string GetMembersTypeName(IDbDataEntity data)
        {
            string name = data.Name;

            int index = name.IndexOf('_');

            if (index >= 0)
            {
                name = name.Substring(index + 1);
            }

            return(name + (data is IDbViewEntity ? "ViewInfoMembers" : "InfoMembers"));
        }
Ejemplo n.º 3
0
 /// <inheritdoc />
 public CodeExpression GetEnableIdentityInsertStatement(IDbDataEntity data)
 {
     return(new CodeObjectCreateExpression(
                typeof(SqlStringStatement),
                new CodePrimitiveExpression(string.Format("SET IDENTITY_INSERT {0} ON", data.SchemaQualifiedName))));
 }