public static void CreatePhysicalProfiles(DTO.PhysicalProfileDTO physicalProfileDTO) { var db = new MealPlannerDbEntities(); var physicalProfile = convertToEntity(physicalProfileDTO); db.PhysicalProfiles.Add(physicalProfile); db.SaveChanges(); }
public static void CreateUser(DTO.MealPlannerDTO mealPlannerDTO) { var db = new MealPlannerDbEntities(); var user = convertToEntity(mealPlannerDTO); db.Users.Add(user); db.SaveChanges(); }
public static List <DTO.MealPlannerDTO> GetUser() { var db = new MealPlannerDbEntities(); var users = db.Users.ToList(); var usersDTO = convertToDTO(users); return(usersDTO); }
public static void CreateDietProfiles(DTO.DietProfileDTO dietProfileDTO) { var db = new MealPlannerDbEntities(); var dietProfile = convertToEntity(dietProfileDTO); db.DietProfiles.Add(dietProfile); db.SaveChanges(); }