﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Data.Entity;
using System.Linq;
using System.Web;

namespace Fitness_Tracker_App_3._0.Models
{
    public class FoodModel
    {
        public int ID { get; set; }

        [Required]
        public string Name { get; set; }

        [Required]
        public DateTime LogDate { get; set; }

        public double Servings { get; set; }

        public double CaloriesPerServing { get; set; }
    }

    public class FoodModelDBContext : DbContext
    {
        public FoodModelDBContext()
            : base("DefaultConnection")
        {
        }

        public DbSet<FoodModel> Foods { get; set; }
    }
}