コード例 #1
0
        public void UpdateExpense(CrewExpense crewExpense)
        {
            var attachedCrewExpense = CrewExpenseses.Find(crewExpense.Id);
            Entry(attachedCrewExpense).CurrentValues.SetValues(crewExpense);

            SaveChanges();
        }
コード例 #2
0
        public void AddExpense(CrewExpense crewExpense)
        {
            CrewExpenseses.Add(crewExpense);

            SaveChanges();
        }