public static bool InsertDownload(this SqlContext context, DownloadGuidClass m) { context.Download.Add(m); var count = context.SaveChanges(); return(count == 1); }
public static bool InsertDownload(DownloadGuidClass m) { using (var conn = GetDbConnection()) { var count = conn.Insert(m); if (count == 1) { return(true); } else { return(false); } } }