public Location(LOCATION location) { this.ID = location.LOCATION_ID; this.Name = location.NAME; this.Address = location.ADDRESS; this.Description = location.DESCRIPTION; }
public static Location GetRandomLocationForSplash() { var rand = new Random(); var skip = (int)(rand.NextDouble() * DatabaseEntity.Entity.DB.LOCATIONs.Count()); LOCATION result = DatabaseEntity.Entity.DB.LOCATIONs.OrderBy(location => location.LOCATION_ID).Skip(skip).Take(1).First(); return(new Location(result)); }