public void Add(DataModel.Task task) { using (var db = new SQLiteConnection(FileName)) { db.Insert(task); } }
public DataModel.Task Get(Guid id) { using (var db = new SQLiteConnection(FileName)) { DataModel.Task task = (from t in db.Table <DataModel.Task>() where t.ID == id select t).FirstOrDefault(); return(task); } }
public void Add(DataModel.Task task) { using (var ctx = new TaskContext(ConnectionString)) { TaskContext.Tasks.AddOrUpdate(task); TaskContext.SaveChanges(); } }
public void Update(DataModel.Task task) { using (var db = new SQLiteConnection(FileName)) { //var y = db.Table<DataModel.Task>().Where(x => x.ID == task.ID).FirstOrDefault(); //Mapper.Map(task,y); db.Update(task); } }
public void Update(DataModel.Task task) { DataModel.Task Update = GetAll().FirstOrDefault(e => e.ID == task.ID); Update = task; TaskManagementEntities.SaveChanges(); }
public void Add(DataModel.Task task) { TaskManagementEntities.Tasks.AddOrUpdate(task); TaskManagementEntities.SaveChanges(); }
public void Update(DataModel.Task task) { Add(task); }
public void Update(DataModel.Task task) { DataModel.Task updateTask = Tasks.FirstOrDefault(t => t.ID == task.ID); Mapper.Map(task, updateTask); WriteData(Tasks, JsonData); }
public void Add(DataModel.Task task) { Tasks.Add(task); WriteData(Tasks, JsonData); }