public bool SaveFile(PropertyFileModel file) { try { _db.PropertyFiles.Add(new PropertyFile() { FileName = file.FileName, PropertyId = file.PropertyId }); _db.SaveChanges(); return(false); } catch (Exception e) { return(false); } }
public static PropertyFile ToEntity(this PropertyFileModel model, PropertyFile destination) { return(model.MapTo(destination)); }
public static PropertyFile ToEntity(this PropertyFileModel model) { return(model.MapTo <PropertyFileModel, PropertyFile>()); }