public string Insert(Schedule entity) { try { _database.Schedules.Add(entity); _database.SaveChanges(); return(null); } catch (Exception ex) { return(ex.Message); } }
public string Insert(OrderDetail entity) { try { _database.OrderDetails.Add(entity); _database.SaveChanges(); return(null); } catch (Exception ex) { return(ex.Message); } }
public string Insert(CarDiagram entity) { try { _database.CarDiagrams.Add(entity); _database.SaveChanges(); return(null); } catch (Exception ex) { return(ex.Message); } }
public string Insert(Order entity) { try { entity.OrderDate = DateTime.Now; _database.Orders.Add(entity); _database.SaveChanges(); return(null); } catch (Exception ex) { return(ex.Message); } }
public string Insert(BusStation entity) { try { entity.Name = entity.Name.Trim(); _database.BusStations.Add(entity); _database.SaveChanges(); return(null); } catch (Exception ex) { return(ex.Message); } }
public string Insert(Account entity) { try { MD5 md5Hash = MD5.Create(); entity.Pass = GetMd5Hash(md5Hash, entity.Pass); _database.Accounts.Add(entity); _database.SaveChanges(); return(null); } catch (Exception ex) { return(ex.Message); } }