Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Delphi-News aus aller Welt (https://www.delphipraxis.net/58-delphi-news-aus-aller-welt/)
-   -   Adding a [FixedLength] Attribute in Code-First Entity Framework (https://www.delphipraxis.net/186247-adding-%5Bfixedlength%5D-attribute-code-first-entity-framework.html)

DP News-Robot 17. Aug 2015 20:10

Adding a [FixedLength] Attribute in Code-First Entity Framework
 
In Code First Entity Framework models, you can define the length of a string field with StringLengthAttribute, but you have to write code in OnModelCreating to indicate a CHAR/NCHAR fixed length field: public class MyEntity { [Key] public int Id { get; set; } [StringLength(2)] public string ...http://feeds.feedburner.com/~r/delph...~4/nRy2YwkgS3U

More...


Alle Zeitangaben in WEZ +1. Es ist jetzt 04:23 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz