Advertisement
onzulin

clases modelo de datos

Feb 19th, 2015
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.81 KB | None | 0 0
  1.     [Table("usuarios")]
  2.     public class Usuarios
  3.     {
  4.        
  5.         [Key]
  6.         [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
  7.         public Int64 id { get; set; }
  8.         [MaxLength(250)]
  9.         public string email { get; set; }
  10.         [MaxLength(250)]
  11.         public string password { get; set; }
  12.         [MaxLength(250)]
  13.         public string nombre { get; set; }
  14.         [MaxLength(250)]
  15.         public string apellidos { get; set; }
  16.         [MaxLength(250)]
  17.         public string numerotelefono1 { get; set; }
  18.         [MaxLength(250)]
  19.         public string numerotelefono2 { get; set; }
  20.         public DateTime created_at { get; set; }
  21.         public DateTime updated_at { get; set; }
  22.         //define la propidad de navegacion
  23.         public virtual ICollection<Actividades> Actividades { get; set; }
  24.     }
  25.  
  26. [Table("actividades")]
  27.     public class Actividades
  28.     {
  29.         [Key]
  30.         [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
  31.         public Int64 Id { get; set; }
  32.         [MaxLength(100)]
  33.         public string Nombre { get; set; }
  34.         [Column("informacion", TypeName = "ntext")]
  35.         [MaxLength(250)]
  36.         public string Informacion { get; set; }
  37.         [MaxLength(250)]
  38.         public string Direccion { get; set; }
  39.         public DateTime Horarioinicial { get; set; }
  40.         public DateTime Horariofinal { get; set; }
  41.         [MaxLength(250)]
  42.         public string Latitud { get; set; }
  43.         [MaxLength(250)]
  44.         public string Longitud { get; set; }
  45.         [MaxLength(250)]
  46.         public string Altitud { get; set; }
  47.         //precision = accurac
  48.         public string Accuracy { get; set; }
  49.         public Int64 UsuarioID { get; set; }
  50.         public virtual Usuarios Usuario { get; set; }
  51.        
  52.        
  53.        
  54.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement