Beispiel #1
0
        public static ResponseMessage GetAllNames()
        {
            List <string> result = NameDbOperations.GetAllNames();

            if (result != null)
            {
                return(ResponseMessage.Ok(result));
            }
            return(ResponseMessage.NOk());
        }
Beispiel #2
0
        public static ResponseMessage GetNameById(long recordId)
        {
            var result = NameDbOperations.GetById(recordId);

            if (result != null && result.Id > 0)
            {
                return(ResponseMessage.Ok(result));
            }
            return(ResponseMessage.NOk());
        }
Beispiel #3
0
        public static ResponseMessage FindName(string queryName)
        {
            var result = NameDbOperations.FindByName(queryName);

            if (result != null && result.Id > 0)
            {
                return(ResponseMessage.Ok(result));
            }
            return(ResponseMessage.NOk());
        }