public async Task <int> SaveTag([FromBody] LookupTag obj)
 {
     try
     {
         return(await this._lookupTag.SaveTag(obj));
     }
     catch (Exception ex)
     {
         Logger.LogError($"Something went wrong inside TagController SaveTag action: {ex.Message}");
         return(-1);
     }
 }
 public async Task <List <LookupTag> > GetAllTag([FromBody] LookupTag obj)
 {
     try
     {
         return(await this._lookupTag.GetAllTag(obj));
     }
     catch (Exception ex)
     {
         Logger.LogError($"Something went wrong inside TagController GetAllTag action: {ex.Message}");
         return(null);
     }
 }
예제 #3
0
 public async Task <List <LookupTag> > GetAllTag(LookupTag obj)
 {
     try
     {
         DynamicParameters parameters = new DynamicParameters();
         List <LookupTag>  lst        = (await SqlMapper.QueryAsync <LookupTag>(con, "p_Tag_sel", param: parameters, commandType: StoredProcedure)).ToList();
         return(lst);
     }
     catch (Exception ex)
     {
         throw (ex);
     }
 }
예제 #4
0
        public async Task <int> SaveTag(LookupTag obj)
        {
            try
            {
                DynamicParameters parameters = new DynamicParameters();
                parameters.Add("@TagId", obj.TagId);
                parameters.Add("@TagName", obj.TagName);
                parameters.Add("@Description", obj.Description);
                parameters.Add("@Active", obj.Active);
                parameters.Add("@UserId", obj.CreatedBy);
                var res = await SqlMapper.ExecuteAsync(con, "p_Tag_ins", param : parameters, commandType : StoredProcedure);

                return(res);
            }
            catch (Exception ex)
            {
                throw (ex);
            }
        }
예제 #5
0
 public Task <int> SaveTag(LookupTag obj)
 {
     return(_lookupTag.SaveTag(obj));
 }
예제 #6
0
 public Task <List <LookupTag> > GetAllTag(LookupTag obj)
 {
     return(_lookupTag.GetAllTag(obj));
 }