public static int CreateAsset(Assets asset) { try { using (VedantaEntities ve = new VedantaEntities()) { ve.AddToAssets(asset); return(ve.SaveChanges()); } } catch (Exception) { return(0); } }