Skip to content

Instantly share code, notes, and snippets.

@jjaramillo
Created December 2, 2011 20:13
Show Gist options
  • Save jjaramillo/1424673 to your computer and use it in GitHub Desktop.
Save jjaramillo/1424673 to your computer and use it in GitHub Desktop.
public partial class Afiliado
{
public Afiliado()
{
this.CategoriasXAfiliado = new HashSet<CategoriaXAfiliado>();
this.Productos = new HashSet<Producto>();
this.Sucursales = new HashSet<Sucursal>();
}
public System.Guid IdAfiliado { get; set; }
public int IdUsuario { get; set; }
public string Nombre { get; set; }
public string Nit { get; set; }
public string Descripcion { get; set; }
public string UrlImagen { get; set; }
public string NombreContacto { get; set; }
public string TelefonoContacto { get; set; }
public string EmailContacto { get; set; }
public string SitioWeb { get; set; }
public string Twitter { get; set; }
public string FacebookPage { get; set; }
public string GooglePage { get; set; }
public string RazonSocial { get; set; }
public bool Activo { get; set; }
public bool Contactado { get; set; }
public virtual User User { get; set; }
public virtual ICollection<CategoriaXAfiliado> CategoriasXAfiliado { get; set; }
public virtual ICollection<Producto> Productos { get; set; }
public virtual ICollection<Sucursal> Sucursales { get; set; }
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using DondeCompro.Data;
namespace DondeCompro.Controllers
{
public class AfiliadoComparer:IComparer<Afiliado>
{
public int Compare(Afiliado x, Afiliado y)
{
return x.IdAfiliado.GetHashCode() - y.IdAfiliado.GetHashCode();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment