public DailyExpensesVM Get(int id)
        {
            DailyExpensesVM dailyExpensesVM = new DailyExpensesVM();
            var             obj             = repository.Get(id);

            dailyExpensesVM.ID          = obj.ID;
            dailyExpensesVM.Description = obj.Description;
            dailyExpensesVM.Date        = obj.Date;
            dailyExpensesVM.Coast       = obj.Coast;

            return(dailyExpensesVM);
        }
 public DailyExpensesVM Edit(DailyExpensesVM vM)
 {
     try
     {
         DailyExpenses obj = repository.Get(vM.ID);
         obj.Coast       = vM.Coast;
         obj.Date        = vM.Date;
         obj.Description = vM.Description;
         var Addedobj = repository.Add(obj);
         return(vM);
     }
     catch
     {
         return(null);
     }
 }
 public DailyExpensesVM addInDb(DailyExpensesVM vM)
 {
     try
     {
         DailyExpenses obj = new DailyExpenses();
         obj.Coast       = vM.Coast;
         obj.Date        = vM.Date;
         obj.Description = vM.Description;
         var Addedobj = repository.Add(obj);
         vM.ID = Addedobj.ID;
         return(vM);
     }
     catch
     {
         return(null);
     }
 }