Bonjour.
Voilà c'est la première fois que je cré une base en codefirst, avant j’utilisais toujours le modelfirst, ô combien merveilleux.
Alors je cré ma classe dans mon classlibrary :
Malheureusement, mes using concernant les bibliothèques de DataAnnotations ne sont pas reconnus. Que ce passe t'il ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace LivDevis.ClassLibrary.Entities { public class User { public User() { this.IsActivated = false; this.IsAuthorized = false; } //[Key] public virtual Guid UserID { get; set; } public virtual string Firstname { get; set; } public virtual string Lastname { get; set; } public virtual string Email { get; set; } public virtual byte[] PasswordHash { get; set; } public virtual byte[] PasswordSalt { get; set; } public virtual Guid ActivationCode { get; set; } public virtual bool IsActivated { get; set; } public virtual bool IsAuthorized { get; set; } } }
Merci![]()
Partager