コード例 #1
0
 public List <Destination> GetDestinations()
 {
     try
     {
         using (var context = new DestinationsContext())
         {
             DbInitializer.Initialize(context);
             var result = context.Destinations.ToList();
             return(result);
         }
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
コード例 #2
0
 public DestinationsController(DestinationsContext db)
 {
     _db = db;
 }