public Local_Database.Shape ConvertToDBShape(SharedDataTypes.Shape s) { return(new Local_Database.Shape { ID_Shape = s.ShapeId, Name = s.Name, Image = s.Image, ModifyDate = DateTime.Now }); }
public DataBases.Shape ConvertToDBShape(SharedDataTypes.Shape shape) { return(new DataBases.Shape { ID_Shape = shape.ShapeId, Name = shape.Name, Image = shape.Image, ModifyDate = DateTime.Now }); }
public bool InsertShape(SharedDataTypes.Shape s) { localDb.Shape.Add(converter.ConvertToDBShape(s)); return(localDb.SaveChanges() == 1); }