-
Notifications
You must be signed in to change notification settings - Fork 0
/
efprop.snippet
39 lines (39 loc) · 1.27 KB
/
efprop.snippet
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>Configure property for EF provider</Title>
<Author>DepthRel</Author>
<Description>Call insert of configuration of the column on entity property</Description>
<Shortcut>efprop</Shortcut>
</Header>
<Snippet>
<Code Language="CSharp">
<![CDATA[builder.Property(x => x.$Property$).HasColumnName(Columns.$ColumnName$).HasPrecision($Precision$).IsRequired($IsRequired$);
$end$]]>
</Code>
<Declarations>
<Literal>
<ID>Property</ID>
<ToolTip>Mapped property</ToolTip>
<Default>Id</Default>
</Literal>
<Literal>
<ID>ColumnName</ID>
<ToolTip>The name of column in table</ToolTip>
<Default>ID</Default>
</Literal>
<Literal>
<ID>Precision</ID>
<ToolTip>The precision of column in table</ToolTip>
<Default>19</Default>
</Literal>
<Literal>
<ID>IsRequired</ID>
<ToolTip>Is column can't be null</ToolTip>
<Default>false</Default>
</Literal>
</Declarations>
</Snippet>
</CodeSnippet>
</CodeSnippets>