public long Save(SketchShareMapping master)
 {
     if (master.SketchShareId == 0)
     {
         db.SketchShareMappings.Add(master);
     }
     db.SaveChanges();
     return(master.SketchShareId);
 }
        public bool Delete(long id)
        {
            SketchShareMapping master = GetSketchShareMappingById(id);

            if (master != null)
            {
                db.SketchShareMappings.Remove(master);
                db.SaveChanges();
                return(true);
            }
            else
            {
                return(false);
            }
        }
Beispiel #3
0
        public static SketchShareMappingModel Mapping(SketchShareMapping db)
        {
            SketchShareMappingModel model = new SketchShareMappingModel();

            model.SketchShareId = db.SketchShareId;
            model.SketchId      = db.SketchId;
            model.UserId        = db.UserId;
            model.IsActive      = db.IsActive;
            model.IsDelete      = db.IsDelete;
            model.CreatedBy     = db.CreatedBy;
            model.CreatedOn     = db.CreatedOn;
            model.UpdatedBy     = db.UpdatedBy;
            model.UpdatedOn     = db.UpdatedOn;

            return(model);
        }